Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

auto filling the text field by retrieving option set value from another entity

$
0
0

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


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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