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
Oliver Freeman 9Oliver Freeman 9 

Field for time since last modification to a specific field in a custom object

Hey Guys,

I'm currently working on adding a field to a custom object (Repair) that will display the time since the last change/modification of a certain field within the Repair object (Asset Location).
Similar to Last Modified Date/Time, but field specific, if that makes sense?

So essentially what I'm wanting to use this for, is when a repair spends a certain amount of time with the asset sat in a particular location, an email alert is sent to the team leader and case owner.

Thanks in advance for any help!

Oli
Best Answer chosen by Oliver Freeman 9
Akhil AnilAkhil Anil
Hi Oliver,

As mentioned in my post above, you need to use the 2nd Evaluation criteria

User-added image

That should work !

All Answers

Akhil AnilAkhil Anil
Hi Oliver,

You can setup a workflow on the Repair object to achieve this. You will have to create a custom Date field or a Datetime field to capture this.Your workflow would be as below.

Evaluation Criteria : Everytime a record is either created or updated (2nd Option)

Workflow Entry Formula

 
OR(
AND(
ISNEW(),
NOT(ISBLANK(fieldname__c))
),
ISCHANGED(fieldname__c)
)

In the above formula, replace the fieldname__c with the field for which you want to capture the last change. Use the insert field option to use the right API name of the fields.

Workflow field Update Formula

The formula to update the Date or Datetime field depending on the field type that you create would be as below.

Date field formula
 
TODAY()

Datetime field formula
 
NOW()

Simply activate your workflow and you are good to go !

Kindly mark it as an answer if that works for you.
Oliver Freeman 9Oliver Freeman 9
Hey Akhil,

I'm getting the following error when trying to add this formula to the entry criteria on the workflow:
"Error: Function ISNEW may not be used in this type of formula"

Thanks,
​Oli
Akhil AnilAkhil Anil
Hi Oliver,

As mentioned in my post above, you need to use the 2nd Evaluation criteria

User-added image

That should work !
This was selected as the best answer
Oliver Freeman 9Oliver Freeman 9
Hi Akhil,

Thanks for your help - I found that it worked better to use Process Builder for this rather than a standard workflow.
All up and running as I wanted now though.

Thanks again,
Oli