0

I have a custom field in LEAD obejct which is also there in MARKETO and grabs data from MARKETO evrytime there is a value added to that field in MARKETO/ Everytime the value is changed the respective is updated in salesforce. I only want the intial value(INSERT) but not the values edited/added later(UPDATE). Am trying to write a formula field as follows:

IF( ISBLANK( GA_term__c ) , GA_term__c , NULL)

Am writing this value to populate the new field but am not knowing how to stop the new field from continuously updating the value when ever the value of "GA_term__c" is changed with respect to MARKETO.

Can anyone help with this issue?

I also tried to create a third field and the formulas were as follows

1st field - GA_term__c - text

2nd Field - GA_term_formula__c - formula

IF( ISBLANK( GA_term__c ) , GA_term__c , NULL)

3rd Field - GA_term_final__c - formula

IF( NOT ISBLANK( GA_term__c ) || GA_term__c != GA_term_formula__c, GA_term_formula__c, NULL)

1 Answer 1

1

It has been a couple of years since I worked with Marketo + SFDC but I believe by design, Marketo will sync all SFDC non-formula fields between its database and the SFDC Lead SObject.

So, what you are going to need to do is the following (two options)

Option: use workflows

  1. Create a new custom field called orig_ga_term__c on Lead
  2. Use a workflow to populate (via a field update) orig_ga_term__c from ga_term__c when orig_ga_term__c is null
  3. Although Marketo will sync orig_ga_term__c back and forth, its value is managed exclusively by you in SFDC (provided no marketing genius decides to associate orig_ga__c to some web lead capture form!) so the "original" value is forever retained.

Option: use before insert/update trigger on Lead

  1. Same as above except use apex to retain the first non-null value for ga_term__c into orig_ga_term__c

Caveats - you may need to modify the above for the cases where ga_term goes from non-null back to null back to non-null - this is a business logic question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .