+ Start a Discussion
SFDummySFDummy 

Address match

On a contact I have mailing address and Other Address.

how can I check if the both address are same without writing my own code

 

any suggestions?

Best Answer chosen by Admin (Salesforce Developers) 
kyle.tkyle.t

I assume, by code, you mean Apex code.  You could write a custom formula.  Return type of text

 

 

IF(  BillingStreet ==  ShippingStreet  && BillingCity ==  ShippingCity &&  BillingState ==  ShippingState  &&  BillingPostalCode  ==  ShippingPostalCode , 'Yes','No')

 

 

All Answers

BA_AdminBA_Admin

You can see this by extracting the mailing address and other address by using dataloader and comparing by using excel function

kyle.tkyle.t

I assume, by code, you mean Apex code.  You could write a custom formula.  Return type of text

 

 

IF(  BillingStreet ==  ShippingStreet  && BillingCity ==  ShippingCity &&  BillingState ==  ShippingState  &&  BillingPostalCode  ==  ShippingPostalCode , 'Yes','No')

 

 

This was selected as the best answer
SFDummySFDummy

Thanks for the quick response.

modified the formula little bit and works fine.

IF( ISBLANK(MailingStreet) , null,
IF( AND(( MailingStreet = OtherStreet ), (MailingCity = OtherCity), (MailingState = OtherState) ), "Yes", null)
)

 

This will give me the value only if the address exists, otherwise I was get "Yes" if both are empty.