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
CRM_MikeCRM_Mike 

Capturing name of changer

I want to create a custom field to contain the UserID of the person who last changed either of 2 key fields.  My attempts have gotten me as far as "ISCHANGED () IS NOT ALLOWED FOR THIS TYPE OF FIELD".  Now I'm stuck.  Can anyone unstick me?:smileyvery-happy:
Jeff TalbotJeff Talbot

My gut thinks this isn't possible, but I've been wrong before. I'll try it and see what I can do. What object and fields are you working with?

CRM_MikeCRM_Mike
I'm looking at a Date field and a number field (both of which are entered by my users) on the ASSET record.  These two fields (with a 3rd) are passed to a called routine which generates our machine-level license.
jjcrownerjjcrowner
I have been able to do this with a workflow rule that triggers a field update with this formula:  ($User.FirstName &" "& $User.LastName)
 
Does this help?
CRM_MikeCRM_Mike
It might.  Can you please tell me how you were able to detect "changed" status?
jjcrownerjjcrowner

In my case, it was a picklist that was being changed, so my workflow rule identified all of the picklist choices.  So the logic was "If status equals In Process, Approved, or Not Approved", then update this field with the name of the user who made the picklist selection. 

You just have to create a new text field to record the user's name with the field update, since you can't put a formula in a lookup field update.

I'm certainly not a salesforce expert, but please feel free to e-mail me directly if you think I can be of help.

 

-- Julie

Jeff TalbotJeff Talbot
Did you copy/paste the error message you recieved? I can't reproduce that specific error. I'm using a custom date field and a custom number field (you didn't specify which fields, so I don't know if you're using standard or custom fields on the Asset table). Another thing that hasn't been clarified, but I'm assuming, is that your formula is in a workflow rule.
 
I got this similar error at first:
Error: Function ISCHANGED may not be used in this type of formula
But that was only because I hadn't yet selected the option for "Every time a record is created or edited". Once I changed that I got no errors with this formula:

OR(
ISCHANGED(Acceptance_Date__c),
ISCHANGED(Number_Of_Days__c)
)

Once you get the worfklow rule working, the workflow field update that jjcrowner suggested should give you what you need. Good luck!
CRM_MikeCRM_Mike

You are correct.  Here is what I tried to do.  I created a Custom field with type of Formula, and the formula returning a TEXT string.  Here's my formula:

IF ( OR (
                  ISCHANGED( Station_Expiration__c  ),
                  ISCHANGED( Max_Class_Quoted__c  )
                                                                                     ) ,
      $User.FirstName  &  " " & $User.LastName , null )

My goal was to capture the First and last name of the user who changes either of the 2 fields.
 
Here's the message I received when I did "Check Syntax": Error: Function ISCHANGED may not be used in this type of formula
 
I did not see the "Every time........." reference in your response.
 
Mike
CRM_MikeCRM_Mike
PROBLEM SOLVED!!!!!!!!!!!!!!!!!  Thanks everyone!!!!!!!!!!!!!!!!!!!!:smileyvery-happy::smileyvery-happy: