You need to sign in to do that
Don't have an account?
tanushree Dutta 8
How can I add current date in Status Update field, everytime whenever new comments are updated in that field
Hi All,
I am new to Salesforce, so please help me with this requirement.
I have a Status update field in support request and we have very frequest to-and-fro comments between us and the clients.
The requirement is to add Current date whenever this field is updated.
Eg :
Updation done by user on 1 Sep 2017 :
"9/1/17 - <<Comments by user>>"
Further updation done by user on 4 Sep 2017 :
"9/1/17 - <<Comments by user>>
9/4/17 - <<Additional comments by user>>"
Please guide.
I am new to Salesforce, so please help me with this requirement.
I have a Status update field in support request and we have very frequest to-and-fro comments between us and the clients.
The requirement is to add Current date whenever this field is updated.
Eg :
Updation done by user on 1 Sep 2017 :
"9/1/17 - <<Comments by user>>"
Further updation done by user on 4 Sep 2017 :
"9/1/17 - <<Comments by user>>
9/4/17 - <<Additional comments by user>>"
Please guide.
do the field contains old comments and new comments.
Can you please provide some more information like:
- What do you mean by this field update. On update of which field you want to update your comments field ?
- On which field you want to store the current date.
You can acheive this with the help of thr trigger where sample code will look something like below:Please let me know if you need any futher help on this.
Thanks,
Abhishek Bansal.
Thank you both for your replies.
We interact with our clients for their queries/issues on Suport Request and put our statements, starting with current date and then our comments, on this field "Status update" Its a Test Area field.
Also the clients provide their own comments, if thay want to, on this "Status update" field but putting the current date under the last comment and then put their comments and save.
What the requirement is, instead on typing the current date everytime (by us or clients). ithe date should get automaticaly get populated whenever we click on "Update", under the latest comments and we or clients can just put our comments and hit Save.
Please help me with this requirement. Many many thanks.
From your reply on 5th Sep, can you please help me with following doubts?
Please help me that instead of your lines - "'Further Comments added by user'" and "'Comments added by user'", how can I put the latest data (new update on the Status Update field)?
Thanks in advance.
Please find the updated code below:
Please let me know if this works for you and you can also contact me on Gmail or Skype if there is any urgency on it.
Gmail: abhibansal2790@gmail.com
Skype: abhishek.bansal2790
Thanks,
Abhishek Bansal.
Thanks a ton for your quick reply. One more help from you I needed.
Actually, Status Update is the only field I need to work on, i.e. no Comments__c field is needed there.
My requirement is to do -
If first time insert of any comments on Status Update --> then StatusUpdate__c = Today's date + Inserted Value
eg: - Inserted value = "Please work on this". So, Status Update should be - 2017/09/27.Please work on this
If update is later, on this same inserted value on Status Update field --> then StatusUpdate__c = Last old value + Today's date + New value.
eg.- Updated value = "Work in progress."
So the Status Update should now be -
2017/09/27 Please work on this
2017/09/27 Work in progress.
Please guide me. Thank you.
Please find the updated code below:
Let me know if you face any issue with this.
Thanks,
Abhishek Bansal.
I put your code and on savem it gives error - "Error: Compile Error: Variable does not exist: StatusUpdate__c at line 5 column 54"
Its not accepting lines where we have - + StatusUpdate__c. Please guide.