Skip to content


Converting Salesforce BillingAddress into 2 lines

Brandon Aronson asked 4 years ago
Hello Again, 
I am currently trying to bring data from SalesForce into Great Plains.  The address field in salesforce is a compound of multiple fields, (street, city, state, zip, country).
What I am trying to do is pull the street, but there can be more than one line.  When smartconnect brings it over, it brings a 2 line addresses from salesforce into Great Plains as a 1 line address, combining them.
I have tried numerous ways to do a calculated column, but have come up short.  Would anyone have any thoughts on how this can be accomplished?  Essentially I want to break apart the address line on the carriage return.  
I found this article –
Which has the code 
dim findposition as Integer
dim Street1 as String
findposition = _BILLINGSTREET.IndexOf(“,”)
if findposition > 0
    Street1 = Microsoft.VisualBasic.Left(_BILLINGSTREET, findposition )
    Street1 = _BILLINGSTREET
end if
return Street1

It did not work, and I tried the following in place of the comma – vbCrLf, \n, CHAR(10).  None of these seem to work. I’m sure there is a way to do it, but i’m not sure how.
Thank you everyone.

If you would like to submit an answer or comment, please sign in to the eOne portal.