You need to sign in to do that
Don't have an account?
How can we access the BillingAddress or Shipping address in Account ?
I m writiing a trigger to check the Billing address and Shipping address if the billing address is given and shipping address is not given than it matches shipping address with billing address.
I am not able to get access to Billingaddress or shipping address in account.
Throws a error:Compile Error: Data type not supported: Address at line 6 column 9
trigger AccountAddressTrigger on Account (after insert,after update)
{
for(Account a:Trigger.new)
{
if(a.BillingAddress!='')
{
}
}
}
I am not able to get access to Billingaddress or shipping address in account.
Throws a error:Compile Error: Data type not supported: Address at line 6 column 9
trigger AccountAddressTrigger on Account (after insert,after update)
{
for(Account a:Trigger.new)
{
if(a.BillingAddress!='')
{
}
}
}
Billing Address & Shipping Address are compound fields, You need to refer each field like BillingStreet,BillingCity,BillingState,BillingPostalCode,ShippingStreet,ShippingCity ... in trigger and write your logic around these fields.
Below link will explain more considerations of compound fields.
https://www.salesforce.com/developer/docs/api/Content/compound_fields_limitations.htm
Thanks,
Balaji
All Answers
Billing Address & Shipping Address are compound fields, You need to refer each field like BillingStreet,BillingCity,BillingState,BillingPostalCode,ShippingStreet,ShippingCity ... in trigger and write your logic around these fields.
Below link will explain more considerations of compound fields.
https://www.salesforce.com/developer/docs/api/Content/compound_fields_limitations.htm
Thanks,
Balaji
I think the link you reference has changed. I believe the new link to "Compound Field Considerations and Limitations" can be found here:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm