Skip to main content
Alessandro Longoni (Docebo) a posé une question dans #Apex
Looking at the Summer 18 realease notes, the QuickAction.QuickActionDefaultsHandler interface should work even in Lightning Experience. But it seems that, unlike in Salesforce Classic, it doesn't give you the capability to filter out the From Addresses you can choose from the picklist. 

In Salesforce Classic you do something like this

EmailMessage emailMessage = (EmailMessage)sendEmailDefaults.getTargetSObject();

emailMessage.FromAddress = 'my-email@example.com';

List<String> fromList = sendEmailDefaults.getFromAddressList();

if(fromList != null){

for (Integer i = fromList.size() - 1; i >= 0; i--) {

if (!fromList.get(i).equals(emailMessage.FromAddress)) {

fromList.remove(i);

}

}

}

In Lightning, however, this does not change the values in the picklist. 

I kept searching and I found out that the picklist From on the Email message is called ValidatedFromAddress, instead of FromAddres. So, is there any possibilty to restrict the value of this picklist dinamically?
3 réponses
0/9000