Hi,
I need some guidance with SDK.REst retrievemultiplerecords script that I am trying to write.
I am querying incident entity to retrieve a custom date field value into the child entity on load of the form. Once I get the date, I will require or not require some of the fields on child entity form.
BUt I am unable to get the results from parent entity using SDK.Rest.retrievemultiplerecords.
Here is my script:
function require() { debugger; var incidentId; var replacedEncounterId; if (Xrm.Page.data.entity.attributes.get("new_incidentid").getValue() != null) { incidentid= Xrm.Page.data.entity.attributes.get("new_incidentid").getValue()[0].id; replacedIncidentId=incidentid.replace('{', '').replace('}', '') } SDK.REST.retrieveMultipleRecords( "Incident", "$select=new_eventdate&$filter=incidentid eq guid '" + replacedIncidentId+ "'", function onSuccess(results){ debugger; var firstResult=results[0]; } , function errorHandler(error) { writeMessage(error.message); } , onCompleteHandler ); }
Thanks for any help!
*This post is locked for comments