Mandatory fields - UI Policies and Service Portal

LG21
Giga Contributor

Hi,

I understand (from other post on the forum) that when using mandatory fields on the Service Portal with a record producer these now need to be removed and replaced with a UI policy on the target form to prevent a submit failure.

We have a record producer in our Service Catalog which creates incidents - similar to the "report an issue" out of the box record producer (but our version has added variables). With mandatory fields in the record producer it would not submit via the portal, so I have removed the mandatory=true where they existed in the variables within the , and created a UI policy on the incident form which I specified to apply to the Self Service view rather than the default "global", but the fields are now not mandatory in the Service Portal.  I also tried making the UI Policy apply to the Service Portal view as well, but that also fails to make the fields mandatory.  The UI policy has no conditions set.  (For reference I have also tried making the policy "global" in terms of view and this doesn't work either).

Can anyone help with mandatory fields in Record Producers when using with the Service Portal please?

thanks

1 ACCEPTED SOLUTION

Hi,

Can you make the ui policy global instead of view specific for time being and put alert message in script and make the script "Run scripts in UI type" to "ALL" as per below screen shot. if it still doesnt work then you can reach HI team.

find_real_file.png

View solution in original post

7 REPLIES 7

rinadsouza
Giga Contributor

Hi,

 

U can try writing a client script instead and try making the fields mandatory also. 

 

Regards,

Rina Dsouza

Harish Murikina
Tera Guru

Hi,

Just to confirm if the UI policy is actually running, can you make the ui policy Run Script to true and write alert messages inside Execute if true and false 

Regards,

Harish Murikinati. 

Hi

I made the UI Policy run script true and put a (different) alert in both true and false.  Neiter alert displayed in either the Service Portal record producer or the main incident form in the main application - i also checked that the script was set to run in "both".

thx

 

screenshots of UI policy below

find_real_file.png

 

find_real_file.png

Hi Harish,

Do you have any further suggestions based on the information I've given last week?

thanks for your help