function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hitesh KhannaHitesh Khanna 

I have two fields "abc__c" and "xyz__c"...... whenever the value of "abc__c" changes , I want to take that date of modification and display in "xyz__c". is that possible?, if yes then how ?

Best Answer chosen by Hitesh Khanna
CharuDuttCharuDutt
Hii Hitesh 
You Can Try Process Builder For This As In Formula We Can't Check If "abc__c" Value is Changed Or Not
User-added image
User-added image
User-added image
User-added image
Please Mark It As Best Answer If It Helps
Thank You!

All Answers

CharuDuttCharuDutt
Hii Hitesh
Try Below Trigger
trigger Accountrigger on Account (After update) {
    if(Trigger.isuUpdate){
         if(trigger.isAfter){
        for(Account Acc : Trigger.new){
            if(Acc.abc__c != null && Acc.abc__c != trigger.oldMap.get(Acc.Id).abc__c){
            Acc.xyz__c = date.newinstance(acc.LastModifiedDate.year(), acc.LastModifiedDate.month(), acc.LastModifiedDate.day());
            	}
			}
		}
    } 
}
Please Mark It As Best Answer If It Helps
Thank You!
Hitesh KhannaHitesh Khanna
Hi charu,
thanks for the reply 
But could You suggest me how to do it through a formula field ?(if that's possible)
My requirement doesnt require need of a trigger.

Appreciate your response.
CharuDuttCharuDutt
Hii Hitesh 
You Can Try Process Builder For This As In Formula We Can't Check If "abc__c" Value is Changed Or Not
User-added image
User-added image
User-added image
User-added image
Please Mark It As Best Answer If It Helps
Thank You!
This was selected as the best answer