Doubt : I am not able to populate the User Name , Can someone please help ?
Or Is there any other API to get the list of users belonging to a particular owner team ?
JS Used:
var req = new XMLHttpRequest();
var url = "https://org293f361d.crm.dynamics.com/api/data/v9.0/teammemberships?$select=teamid,systemuserid&$filter=teamid eq 6830b56f-95e4-eb11-bacb-000d3a115bb2"; //id of my owner team
req.open("GET", url, true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
req.onreadystatechange = function() {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var result = JSON.parse(this.response);
var formContext = executionContext.getFormContext();
for (var j = 0; j< result.value.length ; j++)
{
formContext.getControl("ddi_investigatordetails").addOption({"value" : j+1000, "text" : result.value[j].systemuserid }); //it is the choice name where i have to add user names as dropdown
}
alert("Value set");
}
}
}
req.send();
Ouput Json :

Report
All responses (
Answers (