Hello Experts,
I am stuck in an issue when there is no value available in a specific field. I have written script depending on e-mail address of the Contact. Things are working fine when Contact has E-mail address maintained. But obviously when Contact has no email address which is not mandatory, this part of code must be skipped.
I have written this code in script on my custom BO which is attached as EC on Contact TI. I need to check if email is available before I execute below line of code:
child.zname = resultData.CurrentDefaultIsContactPersonFor.BusinessPartnerRelationship.ContactPerson.ContactPersonWorkplaceAddressInformation.ContactPersonWorkplaceAddress.DefaultEMail.GetFirst().URI.content;
I tried checking:
if(!resultData.CurrentDefaultIsContactPersonFor.BusinessPartnerRelationship.ContactPerson.ContactPersonWorkplaceAddressInformation.ContactPersonWorkplaceAddress.DefaultEMail.GetFirst()..URI.content.IsInitial()
But I am getting Dump, when using this.
How would I handle this? I need to skip the code if the value is not found in email address on the standard BO.
Thanks in advance.
BR,
Max