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
Melissa TournierMelissa Tournier 

Field update from another date field, but new field to only update once

Please help.

I have one field called "Installation Date" and another field called "Original Installation Date".
Currently the Original Installation Date field is mimicking the Installation date field, however need to now put something in place that makes the Original Installation Date field only update once no matter how many time the Installation Date field gets updated.

 


 

 

badibadi
You can do this with a combination of workflow, Validation rule and page layout setting.

1. Pagelayout: make the Original_Installation_Date__c as read-only

2. Validation rule: Once Original_Installation_Date__c is populated, we do not want it to be edited.
     AND(PRIORVALUE( Original_Installation_Date__c ) != Original_Installation_Date__c , 
NOT(ISBLANK(PRIORVALUE(Original_Installation_Date__c ) ) ) )

3. workflow rule: 
    criteria : Original_Installation_Date__c EQUALS null
              Installation_Date__c  NOT EQUAL TO   null
    
    Evaluation Criteria:   Evaluate the rule when a record is created, and every time it's edited

   Action: field update:  update Original_Installation_Date__c  with Installation_Date__c  

Hope this helps
Melissa TournierMelissa Tournier
Should the Original Installation Date field be as a text? Or Date field?
Melissa TournierMelissa Tournier
Also the Installation date field can change as many times, but I need the Original date to stay in the Original Installation Date field and not update to new date
Akhil AnilAkhil Anil
Hi Melissa,

How are you currently updating the Original Installation Date ? Through a workflow ? 

If yes, then you can change the workflow rule criteria like this to ensure that once Original Installation Date is captured only when the Installation Date is entered for the first time
 
AND(
OR(
ISNEW(),
ISBLANK(PRIORVALUE(Installation_Date__c))
),
NOT(ISBLANK(Installation_Date__c))
)

Hope that helps !
badibadi
Original Installation Date field can be Date field

Page layout read-only will make it read only for users
Workflow will fire only when Original Installtion Date is empty, once we populate the Original Installation date validation rule will prevent it from being changed.

So no matter how many times Installation Dates change, Original Installation Date will remain the same
Melissa TournierMelissa Tournier

I think the best thing I will do now is delete the original appointment field and then start again.
 

Can you suggest anything before doing this?
 

badibadi
Melissa, How are you planning on using the Original Installation Date field? If you want to filter a report on the Original Installation Date then I would suggest having it as a Date field. 
Before deleting, If there are any values in the Original Installation Date (text) field, I would import all the information, delete the field or change the field type from text to date field ( data will be lost). Then do a data load to put all the dates back in Date format.

Does it make sense?