- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:30 AM
Hello,
I am not sure where to go now with what I believe should be an onCellEdit client script on the pm_project table to set a custom field "u_original_end_date" to read only 30 days after the value of the "opend_at" field. If the custom field is empty at that time , then it can be populated with another field "work_end" before being set to read only.
Here is what I have pieced together so far:
function onLoad() {
var actend = g_form.getValue('work_end') ;
var origend = g_form.getValue('u_original_end_date') ;
//how do i calculate if 30 days after "opend_at" to then then :
g_form.setReadOnly("u_original_end_date",true);
//but if 30 days have past since the value "opend_at" AND the "u_original_end_date" is empty do this
if(origend== null || origend== undefined) )
{
g_form.setValue('u_original_end_date',actend);
g_form.setReadOnly('u_original_end_date',true);
}
}
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:41 AM - edited 11-16-2023 05:44 AM
If you need to lock it down completely , on form and list both then do it via ACL and not on Client script/ui policy.
If you use ACL in same way, but if you insist on using a client side api then you an use UI policy and add the condition as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:41 AM - edited 11-16-2023 05:44 AM
If you need to lock it down completely , on form and list both then do it via ACL and not on Client script/ui policy.
If you use ACL in same way, but if you insist on using a client side api then you an use UI policy and add the condition as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 07:16 AM
This ACL fulfilled the acceptance criteria: