Check mandatory fields in records in list UI Action

Elena Pomana
Tera Guru

Hello,

I had a task to create a UI Action that promotes all contracts based on the list query:

I know that the list UI Action doesn't take in consideration all mandatory fields from the records.

Part of my task is not to allow records to be "promoted in bulk" if they have mandatory fields.

To do so, I created data policies for the fields that I needed but these records(CNTRADD00003421 and CNTRADD00003420) are created from UI Actions on the "parent" contract (called applied to contract).

I have a UI Action that creates a type "Renewal" and another one that creates a type "Reopen". Upon creation, some fields must be empty and mandatory,  the user needs to fill them.

By having the data policies, my "Renewal" and "Reopen" UI Actions on the parent contract stopped working so I disabled them.

 

What is the best option to use in order to make my list button(onclick) check all the mandatory fields from the record?!

 

Thank you,

Elena

 

2 REPLIES 2

johansec
Tera Guru

I cannot think of anyway to dynamically check each one. I think if I had this requirement I would do the following. 

  1. Create a read only field called something like 'Contract Valid' 
  2. This field would be hidden from any view and purely used to tell if it has been updated. 
  3. Upon creation of the contract 'Contract valid' would be false. Because there are empty mandatory fields. 
  4. The user cannot save the record without filling those fields in because of form validation. 
  5. So when the user saves the record it will trip the flag and set it to true. 
  6. Then in your ui action you can do whatever you want to just the ones that are set to true.

(could also use some sort of state or status field for this to if one exists and just add a new choice option that indicate the user completed their step ) 

Just spitballing hope it helps 

Hello,

 

Sorry for the late answer. Thanks for the idea, I was thinking to add a new field and use it for some sort of checks but wanted to make sure there isn't another way!

Meanwhile the task is on hold.

 

Have a great one,

Elena