Good day,
I am running this query and is coming the result as object [] object in the result for the BusinessUnitId field as the query below, must take the guid BusinessUnitId to then go up to the Business Units entity and bring the name of the business unit, the FirstName and FullName fields as are entry is already bringing the values correctly, thank you:
if (Xrm.Page.getAttribute ("ownerid"). getValue ()! = null)
{
OwerID = Xrm.Page.getAttribute ("ownerid") getValue () [0] .id.;
alert (OwerID);
XrmServiceToolkit.Rest.Retrieve (
OwerID,
"SystemUserSet"
"BusinessUnitId, FirstName, FullName"
null,
function (result) {
var = BusinessUnitId result.BusinessUnitId;
var = FirstName result.FirstName;
var FullName = result.FullName;
},
function (error) {
alert (error.message);
},
true
);






