How to set assigned person in user field on time card record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 03:32 AM
Hi,
We have Time card related list in incident form so once i click on new on time card in related list, whoever assigned person in incident form it will set that same person in user field in time card record.
Can anyone please help on this and provide me the steps, It will be usefull.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 03:55 AM
Wouldn't it be better to fill the record with the current logged in user (gs.getUserID())?
Otherwise some one is creating timecards for someone else.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 04:06 AM
Thanks for Responding!
The person who is assigned a ticket, It should come by the default on the user field in the Time card record.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 04:19 AM
In that case a client script finding the assigned to on the related record and fill it should do the trick.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 04:13 AM - edited 06-27-2024 04:43 AM
Hello @mania ,
By using "show XML" option in form context, please check is there any field present which values comes from the parent incident form like incident no.
If there parent incident number or parent field present in the related record of time card then , use onload client script on time card table and use below logic and update the field names as per your requirement:
function onLoad() {
var incidentNo = g_form.getReference('parent', setincidentNo); // check which field contains incident number and update name of parent.
function setincidentNo(incidentNo) {
var assignedTo = incidentNo.assigned_to; // update it accordingly. you can also try like incidentNo.number.assigned_to
g_form.setValue('user', assignedTo);
}
}
Thank You!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru