Make fields read only after submitting the form through UI policy only for new record

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2022 05:52 AM
Hi ,
I want to make field read only after submitting the form through ui policy only for new record , can someone assist how to achieve this functionality
Thanks
Pavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2022 05:59 AM
Hi
sorry, but I don't understand this. After submitting the form for a new record you return to the previous page (in most of the cases a list view). So why do you want to make a field read only then?
Or should the field remain read-only when the record is opened again?
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2022 06:00 AM
Hello,
This can be achieved by adding a condition which is unique and only appears after the form is submitted and not on a new form.
For ex:- If on a Incident form when trying to create new record the number field is empty but after submit the number field gets populated the UI policy condition will be when number field is not empty, then make the field readonly.
But in UI policy if you are willing to use the script part then you can use the below to check if the record is new or not
g_form.isNewRecord()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2022 08:31 AM
Hi,
I am not totally sure what you are trying to accomplish, but maybe something like this, where after submitting a new incident the impact and urgency fields are set to read only. First I created a UI policy on the incident table with the condition of 'State is New'. Make sure to save the UI policy so you can add your UI policy actions. Then I created two UI policy actions for impact and urgency fields setting 'Read Only to True'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2022 09:55 AM
Hi,
Can you explain your use case what actually you are trying to achieve?
Also I am confused you want to make it read only for New Record, but once you have submitted the record, it is no longer a new record. Both of your conditions are conflicting with each other.
Please share more details to assist you further.
Regards,
Shloke
Regards,
Shloke