function requisitionproducts() {
//Get Current record Id
var Guid = Xrm.Page.data.entity.getId();
var fetchXml =
"<fetch mapping='logical'>" +
"<entity name='quotedetail'>" + //SubGrid entity name
//Condition to Check the subGrid record is associated with current record
"<filter>" +
"<condition attribute='quoteid' operator='eq' value='" + Guid + "' />" +
"</filter>" +
"</entity>" +
"</fetch>";
var fetchedRecord = XrmServiceToolkit.Soap.Fetch(fetchXml)
if (fetchedRecord.length > 0) {
return true;
}
}
After adding this web-resource you need to add the following files to your form page Libraries:
- Json
- jquery
- xrmservicetoolkit
No comments:
Post a Comment