0

Let consider an object which has a field called edit_counting. We knew that for every record, we have a button called EDIT to update the record. First time I edited and save the record. Now the value of Edit_counting is should be 1. Like this How many times I edit the record, that many times the field value needs to get updated automatically. Please can anyone help me in this? Note: Field may be any data type.

Thanks in advance

Kumaran

1
  • You can do it for particular fields, using a workflow. if you want to track changes, better design is to use History Tracking.
    – C0DEPirate
    Jun 28 '16 at 9:19
1

You can create a custom number field and set the default value to zero. Then create a WFR. Your formula would look something like this

OR(
ISCHANGED(Field1__c),
ISCHANGED(Field2__c),
ISCHANGED(Field3__c),
ISCHANGED(Field4__c),
ISCHANGED(Field5__c),
ISCHANGED(Field6__c),
ISCHANGED(Field7__c),
ISCHANGED(Field8__c),
ISCHANGED(Field9__c),
ISCHANGED(Field10__c)
)

Then you create an immediate action of a field update. And your formula for the field update would be

Your_Custom_Number_Field__c + 1

This increases your number field by 1 each time your custom field is changed to a non null value.

You can add other fields in the criteria using OR condition

2
  • Hi CODEPirate, I wanna Your_Custom_Number_Field__c is not editable by anyone. I made this field read-only by using page layout. Even though it is editable. How to made it non editable?????
    – user31765
    Jun 28 '16 at 10:40
  • Looks like you are on system administrator profile. Admins have the permission to edit fields which are made read-only on pagelayouts
    – C0DEPirate
    Jun 28 '16 at 10:46
0

To track the changes made in field create workflow as follows :

  • Create a Number field for Edit_counting
  • Create a workflow that fires whenever there is a edit made by using this formula ISCHANGED(tracking_field)
  • Do a field update on number field as <Edit_counting> + 1 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy