Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to set source group to "Assigned to" field in task's list?

$
0
0

I must set a source group to field "Assigned to" in task list. I tried with SP.FieldUser object but it don't working. How do this programmatically from java script?

I tried achive this with that function:

function setSourceTaskListFields() {

    var appContextSite = new SP.AppContextSite(context, hostweburl + "/" + subWebUrl);
    var field = new SP.FieldUser(context);
    field = appContextSite.get_web().get_lists().getByTitle("Aufgaben").get_fields().getByInternalNameOrTitle("AssignedTo");
    field.set_selectionGroup(6);
    field.update();
    context.load(field);
    context.executeQueryAsync(setSourceTLFSuccess, setSourceTLFFail);
}
function setSourceTLFSuccess() {
    alert("field's source group success added");

}
function setSourceTLFFail(sender, args) {
    alert(args.get_message());
}

But this code was returned error "Object doesn't support property or method 'set_selectionGroup".

Please for help.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>