- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 02:09 PM
Hello developers,
Quick question,
I have a record producer that's built off of the vendor contact table to allow vendors to submit requests. I have a UI policy script to auto-populate the vendor contact's name into the requested by field. This part is partially working.
So its pulling the sys_id of the vendor contact instead of their actual name in requested by field.
Could someone check my this script to see if its correct?
function onCondition() {
g_form.setValue('requested_by',g_user.userID);
g_form.setReadOnly('requested_by',true);
g_form.setMandatory('requested_by',false);
}
Any guidance will be greatly appreciated!
Best regards,
Corey
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 02:04 PM
Hi @Brad Bowman
Finally got the issue resolved and it was just a role issue. We needed to add the 'vendor_contact' role to the user's profile and that fixed the issue.
Thanks for your help on this issue.
Best regards,
Corey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 03:56 PM
We know the UI Policy is sending a sys_id from the sys_user table. Can you confirm that the requested_by variable is referencing the sys_user table? Is the sys_id shown one that belongs to a user record that you could then manually select? It shouldn't affect the outcome, but is there a reason you are doing this in a UI Policy, instead of the more commonly used Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 04:30 PM
Its referencing the vendor contact table and I am able to manually select the vendor contact, its just the autopopulation that is pulling in the sys_id.
Per business requirements, they are opting to use ui policies over client scripts due to issues in the past with upgrades and client scripts not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 05:13 AM
Maybe I'm not understanding something back at the beginning. This is a Record Producer for which table? As a Vendor Contact, I am submitting this to do what?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 02:04 PM
Hi @Brad Bowman
Finally got the issue resolved and it was just a role issue. We needed to add the 'vendor_contact' role to the user's profile and that fixed the issue.
Thanks for your help on this issue.
Best regards,
Corey
