TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
swetha s
1.7k
19
5k
Restapi to update choice field with new vvalues dynamically
Apr 27 2018 3:03 AM
I am trying to append dropdown dynamically from textbox.. I am trying to append hardcoded value to choice but I am getting error.. I neeed to append new value. choice fied has values already. please help. its rugnet
$.ajax({
url: endpointUrl + "/_api/web/lists/GetByTitle('Pages')/fields/GetByTitle('CallAction')",
type: "POST",
data: JSON.stringify({
"__metadata": { "type": "SP.Data.PagesItem" },
"CallAction": { "__metadata": { 'type': "SP.FieldChoice" }, "Choices": {results: ["Test1"] }},
}),
headers: {
"Accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"IF-MATCH": "*",
"X-Http-Method": "PATCH",
},
success: function (data) {
alert("Success");
},
error: function (err) {
alert(JSON.stringify(err));
},
});
Reply
Answers (
2
)
what's wrong with query
Getting parent term using JSOM(Sharepoint Online)