You need to sign in to do that
Don't have an account?
mehellie
Account billing street not populating from custom object?
We have a custom Bill To object that populates address information onto the account. We have this snippet of code -
a.BillingStreet = btst.Street_1__c!=null?btst.Street_1__c:''+' '+btst.Street_2__c!=null?btst.Street_2__c:'';
It is working correctly for Street 1, but Street 2 is not copying from Bill To to the Account. What could be the problem?
It is not a bug, but I would probably not add a space in between your two streets unless the second and the first streets are both non-null.
As written, you will always add a space at the end of a non-null street 1, even if street 2 is null.
Also, you will always add a space before street 2 even if street 1 is null.
More importantly, have you tried setting it up as two statements to determine if that will work: