You need to sign in to do that
Don't have an account?
DJ 367
how to make ToAddress field mandate in emailMessage object
Hello All,
I have done a trigger which make toAddress mandate. However it is not working my code is here. I checked in debug log is toAddress is blank then salesforce automatically assigns AdditionalTo to toAddress field. is there any way to make it mandate? .Thanks
I have done a trigger which make toAddress mandate. However it is not working my code is here. I checked in debug log is toAddress is blank then salesforce automatically assigns AdditionalTo to toAddress field. is there any way to make it mandate? .Thanks
trigger EmailRelatedToIsBlank on EmailMessage (before insert) { for(EmailMessage eMsg : Trigger.new) { system.debug('---eMsg.ToAddress--' + eMsg.ToAddress); if(eMsg.ToAddress != null){ }else{ eMsg.addError('To Address can not be blank'); } } }
The above validation is not working in Lightning experience. Could you please suggest.