You need to sign in to do that
Don't have an account?
Samantha Chua
How to check if Attachment ID is null?
Hi!
I have the following button which executes if contact email is not null. However, I would like to check the presence of an attachment before sending the email.
Can't seem to find the Attachment object though. Any idea how I can add an if condition for Attachment.Id != null?
Regards,
Samantha
I have the following button which executes if contact email is not null. However, I would like to check the presence of an attachment before sending the email.
Can't seem to find the Attachment object though. Any idea how I can add an if condition for Attachment.Id != null?
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} var email = "{!Contact.Email}"; if (email != null) { sforce.apex.execute("sendWelcomeOfficialReceiptEmail","sendOfficialReceipt",{caseId:'{!Case.Id}', contactId:'{!Contact.Id}'}); alert ('Email sent. Please refresh page and check activity history.'); } else { alert ('Contact email is empty. Please specify email and try again.'); }
Regards,
Samantha
try with below code it will help !!
Let me know if it helps !!
Thanks
Manoj