1

I want to increment the value of custom field called BillingUpdate__c(number datatype) of Account object, whenever any value of the Billing Address of the Account object gets updated.

3 Answers 3

3
IF( OR( ISCHANGED (BillingCity),ISCHANGED ( BillingCountry ),ISCHANGED ( BillingState ),ISCHANGED ( BillingPostalCode) ,ISCHANGED (BillingStreet )) , BillingUpdate__c+1,BillingUpdate__c)

Use the above as the field value for the Update

1)Note the workflow you create must be every time the record is created or edited

2)Use the criteria such that any one of the fields i have used in above formula is not null.(following best practice and not allowing this rule to simply run).

3)Please keep default value as 0 for the BillingUpdate__c field .

2
  • 2
    I'd split it :) Put ISNEW() || ISCHANGED(BillingStreet)... in the condition and the formula can be simple IF(ISNULL(BillingUpdate__c),1, BillingUpdate__c + 1) (this to be on the safe side if default value is not 0).
    – eyescream
    Commented Dec 18, 2012 at 6:39
  • Good point!I had made default value as 0. Commented Dec 18, 2012 at 6:57
1

Create a workflow rule on Accout object that gets triggered when Billing Address is updated. Associate a field update with this workflow rule which will set the custom field value to whatever you want it to be.

1

You can either use work flow or trigger for this purpose

1
  • 3
    And how such answer can help Mani, an example would be a nice addition ;)
    – eyescream
    Commented Dec 18, 2012 at 6:36

You must log in to answer this question.

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