Making field(s) mandatory when changing sc_task to "Closed Complete"

MWright1
Giga Guru

Hi all,

I have a requirement that 2 fields be made mandatory before users can set the catalog task to Closed Complete.

I created a client script to handle the UI component.  This works just fine, with one huge exception:

When users change the state via the drop-down option, the Client Script does not kick in and they are able to by pass the validation.  How can I make sure that the validation rule is applied regardless?

find_real_file.png

Thanks much.

M

1 ACCEPTED SOLUTION

chrisperry
Giga Sage

You will need to implement the logic server-side to make sure the validation rule is applied regardless. So you could use an Abort business rule, something like below should work (replace Transfer reason & Short description empty field conditions with your fields accordingly):

find_real_file.png

find_real_file.png

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

View solution in original post

8 REPLIES 8

Very strange, haven't seen that not work before. Is your business rule before insert/update?

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

Hi Christopher,

Before update.  

Thanks again!

M

Hmm that is weird, I'm not sure why that flag isn't working. You could try to abort the action from the business rule script instead as below:

current.setAbortAction(true);

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

Ok I learned something by playing with the settings.

I had clicked the Advanced, even though I did not have anything in the Conditions.  Somehow this interferes with the Abort action.  When I deselected the Advanced checkbox, it worked.

find_real_file.png

 

Thanks again!

M