function getPriorityDetails() {
var EntityName, EntityId, LookupFieldObject;
var resultXml;
LookupFieldObject = Xrm.Page.data.entity.attributes.get('new_incidenttype');
if (LookupFieldObject.getValue() != null) {
EntityId = LookupFieldObject.getValue()[0].id;
EntityName = LookupFieldObject.getValue()[0].entityType;
resultXml = getDetails(EntityName, EntityId);
if (resultXml != null && resultXml.attributes['bis_priority'] != null) {
var priority = resultXml.attributes['bis_priority'].value;
Xrm.Page.getAttribute('bis_priority').setValue(priority);
}
else
Xrm.Page.getAttribute('bis_priority').setValue("");
}
}
function getDetails(EntityName, EntityId) {
var cols = ["bis_priority"];
var retrievedResult = XrmServiceToolkit.Soap.Retrieve(EntityName, EntityId, cols);
return retrievedResult;
}
it's the code i have written to get option set value from another entity to auto fill the present working entity but iam unable to get the text of option set , here iam getting value can any one suggest me how can i do that? refer the bold line