Difference between revisions of "Handling MailingStreet"

From EN Salesforce Integration
Jump to: navigation, search
(Formula to Combine Address 1 and 2)
(Formula to Combine Address 1 and 2)
Line 29: Line 29:
 
Head to the field settings of the [[Engaging Networks Import Records|Engaging Networks Import Record]].  
 
Head to the field settings of the [[Engaging Networks Import Records|Engaging Networks Import Record]].  
  
Create a new formula input and name the field '''Mailing Street Combined'''.
+
Create a new formula input field and it '''Mailing Street Combined'''.
  
 
Set the formula to be
 
Set the formula to be
Line 37: Line 37:
 
EN_Connector__address_1__c & SUBSTITUTE($Label.NewLine, "-", "") & EN_Connector__address_2__c)
 
EN_Connector__address_1__c & SUBSTITUTE($Label.NewLine, "-", "") & EN_Connector__address_2__c)
  
Save
+
'''Save'''
  
 
[[File:Mailing street combined formula.png|thumbnail]]
 
[[File:Mailing street combined formula.png|thumbnail]]
 +
 +
The next step is to expose this new field to the [[Engaging Networks Mapping]] dropdown selections. To do this, find the field set called '''Record Query Filter''' and drag '''Mailing Street Combined''' to be part of the field set.
  
 
== Workflow to separate MailingStreet into Address 1 and Address 2 ==
 
== Workflow to separate MailingStreet into Address 1 and Address 2 ==

Revision as of 15:17, 14 February 2019

Below is an example how Address 1 and Address 2 can be used in combination with the MailingStreet field, on the Contact object.

Note that two process flows are required.

  • The first is to combine Address 1 and 2, into one field on the Engaging Networks Import Record, in order to populate MailingStreet on processing.
  • The second is to separate MailingStreet, into two fields on the Contact object, in order for this data to be pushed correctly to Engaging Networks.


Before creating the following formula and workflows, a Custom Label needs to be created. This will provide a workaround to insert and then find/replace new line characters for the addresses. It is based off this idea, expressed on this blog.

Create a custom label

Head to Setup and create a new 'Custom Label' named 'NewLine'.

Enter

-
-

as the default text.


Newline label.png


Formula to Combine Address 1 and 2

Head to the field settings of the Engaging Networks Import Record.

Create a new formula input field and it Mailing Street Combined.

Set the formula to be

CASE(Len(Trim(EN_Connector__address_2__c)), 0, EN_Connector__address_1__c, EN_Connector__address_1__c & SUBSTITUTE($Label.NewLine, "-", "") & EN_Connector__address_2__c)

Save

Mailing street combined formula.png

The next step is to expose this new field to the Engaging Networks Mapping dropdown selections. To do this, find the field set called Record Query Filter and drag Mailing Street Combined to be part of the field set.

Workflow to separate MailingStreet into Address 1 and Address 2