I had a business requirement to update "Company Name" next to user name on task activity Log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2024 11:44 PM - edited ‎08-05-2024 12:41 AM
My team had a business requirement to update dynamic company name next to user name based on user's company on activity logs without modifying Dictionary. Please refer image in place of line we want to update company name or else do we have any way to show a popup view on activity log of user name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2024 12:32 AM - edited ‎08-05-2024 12:40 AM
Hello @Sachin Mathew ,
On creation of given table record, you have to put GlideRecord on core_company table to fetch the requestor's company name.
e.g. gs.getUser().getCompanyID() will give you sys_id of current logged in user's company. Afterwards, put GlideRecord on core_company table to get company's display value.
getCompanyID() | Returns the company sys_id of the currently logged-in user. | var companyID = gs.getUser().getCompanyID(); |
For your table you can use dot walking to get appropriate value.
Hope it helps.
Regards,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2024 12:43 AM
Hi @ShubhamGarg
Please refer attached image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2024 12:47 AM - edited ‎08-05-2024 12:49 AM
Hello @Sachin Mathew ,
Which table you want to put this code base on? Is it basis on requester?
I understood you want to update work notes with user's company name? but which type of user - Logged in user or customer contact?
Regards,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2024 12:57 AM
When logged in user posted any notes we want to see the activities with user name and company name.