Skip to main content

Notifications

Set Unresolved Email address through Javascript in MSCRM / Dataverse

Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Click Gear Icon at the Top

 

3. Click Advance Settings

 

4. Click Administration 

 

5. Select System settings, it will open a Popup (Select EMAIL tab)

 

6. Set (Allow messages with unresolved email recipients to be sent) to YES

 

rampprakash_0-1638126337594.png

 

Once the Above setting done write the below script in your code

 

 

 

 

function setUnResolvedusers(formContext, getEmailId) {
 if (getEmailId != null) {
 var obj = new Object();
 obj.name = getEmailId;
 obj.entityType = "unresolvedaddress";
 obj.id = "{00000000-0000-0000-0000-000000000000}";
 var toField = formContext.getAttribute("to");
 var toValue = toField.getValue();
 if (toValue != null) {
 toValue.push(obj);
 toField.setValue(toValue);
 }
 else {
 var value = new Array();
 value[0] = obj;
 toField.setValue(value);
 }
 }
}

 

 

 

 

Triggering method:

 

 

 

 

setUnResolvedusers(executionContext,"ramprakashdemo@live.com"

 

 

 

 

That's it 🙂

Comments

*This post is locked for comments