I'm using CRM 2013, I'm writing a JavaScript to check if there is any 'Queue' type entity in the email participants list.
I'm stuck on the part, where I have to write the script to check for this Queue data type.
The MSDN article suggested to use Xrm.Page.data.entity.getEntityName(), however I'm not sure if it works if I plug-in the entity name in there like:
toParty[indxAttendees].getEntityName()
Appreciate your help.
function deleteSenderQueueFromEmail() {
var formType = Xrm.Page.ui.getFormType();
if (formType == 1 || formType == 2) {
var toParty = Xrm.Page.getAttribute("to").getValue();
var ccParty = Xrm.Page.getAttribute("cc").getValue();
var bcParty = Xrm.Page.getAttribute("bcc").getValue();
for (var indxAttendees = 0; indxAttendees < toParty.length; indxAttendees++) {
if (toParty[indxAttendees].getEntityName() == "queue") {
//delete the queue from the list of participants
}
}
}
}