Adding an item to a list through HTTP Get
-
Friday, May 04, 2012 9:33 AM
I have a simple list with 2 columns. User Account Name (domain\user) and Agree (yes no)
An email will be sent out to users with two hyperlinks. Yes and No.
If user clicks on the yes, then an entry is made in the list saying useraccount, yes
if the user clicks no, then an entry is made in the list saying useraccount, no
Does this require custom development or can i achieve this out of box without writing any custom code code?
So basically my URL points to some web service and has the parameters in the URL. The user account name can be an automatically populated field because this is easy to guess as to which user has click the link.
Does this make sense? can it be done?
MSDNStudent Knows not much!
All Replies
-
Friday, May 04, 2012 9:40 AMIs there a reason why you don't simply want to create an out of the box survey with the answers Yes/No?
Paul Turner http://redmanta.co.uk/blog Twitter: @RedMantaUK MCTS:WSS,MOSS,2010 MCITP:2010.
Please remember to click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if it was useful. -
Friday, May 04, 2012 9:44 AM
People HATE going to a page and filling out survey. that is why I want to have yes / no link in the email so that they just click on the link.
If we give them a hyperlink and say go to page and fill survey most users don't go there at all. So the idea is to answer the survey with just one click inside the email.
MSDNStudent Knows not much!
-
Friday, May 04, 2012 10:51 AM
I don't think it is achievable OOTB.
Using REST you can do it using HTTP POST (http://msdn.microsoft.com/en-us/library/ff798339.aspx), which means you would need a small portion of code to build your REST interface call (http://www.sadev.co.za/content/upload-files-sharepoint-using-odata).
If you want a single link on the e-mails to do the job, I would suggest implementing a simple web service with 2 methods, each would create an item in the survey (Yes/No). You could then do a direct URL call from the e-mail.
Cheers
Alex Ferreira :: Blog: http://sharepointsofview.blogspot.com/ :: Twitter: @alexaem
- Proposed As Answer by Ferreira, Alex Saturday, May 05, 2012 6:22 PM
- Marked As Answer by MSDN Student Sunday, May 06, 2012 2:35 AM
-
Friday, May 04, 2012 11:03 AM
Having another thought, if you're not going to do anything with the information you could just add voting buttons to your email and forget about SP.
Paul Turner http://redmanta.co.uk/blog Twitter: @RedMantaUK MCTS:WSS,MOSS,2010 MCITP:2010.
Please remember to click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if it was useful. -
Friday, May 04, 2012 8:10 PM
Use an email-enabled discussion list. Have a SharePoint Designer workflow on that list that runs at creation time to add a record to your custom list.
In your email, make your link a mailto:thelistaddress with subject Yes or No. For example: mailto:<addressOfDiscussion>?Subject=Yes
or
mailto:<addressOfDiscussion>?Subject=NoOh, and there's a setting in SharePoint that allows items created from emails to start workflows. I've forgotten what it is, but you should be able to search for the setting.
Robin
- Edited by Robin In OR Friday, May 04, 2012 8:12 PM
-
Saturday, May 05, 2012 9:51 AM
But this is still two clicks
1. click on mailto hyperlink
2. click send
3. click on some outlook security warning (a program is trying to send email) or some other outllook nonsense.
MSDNStudent Knows not much!
-
Saturday, May 05, 2012 2:31 PM
I think there is only 1 solution that I hyperlink to an aspx page on sharepoint. I pass all the parameters as HTTP get to the page.
The page then uses server object model to then make an insert in the list.
the page will have to be custom coded though... so perhaps there is no OOB solution possible.
MSDNStudent Knows not much!

