Home > MS CRM 2015 > Set Unresolved Email in party List using Java Script

Set Unresolved Email in party List using Java Script


While doing google search this morning i found below trick to set unresolved email address on the partylist lookup field

http://mscrmbi.blogspot.com/2014/03/set-unresolved-email-ids-in-party-list.html

function setUnresolvedRecipient(unresolvedemail) {
        var obj = new Object(); //create the unresolved object
        obj.name = unresolvedemail;
        obj.category = 3;
        obj.data = unresolvedemail;
        obj.type = "9206";
        var toField = Xrm.Page.getAttribute("to");
        var toValue = toField.getValue();
        if (toValue != null) {
            toValue.push(obj); //if there are already other values, add to it
            toField.setValue(toValue);
        }
        else {
            toField.setValue([obj]); //if 'to' field is null, just override it
        }       
}
Advertisements
Categories: MS CRM 2015
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: