Risk Assesement Mandtory

nameisnani
Mega Sage

Hi team , 

 

nameisnani_0-1707122315474.png

 

Please assist in making the "Risk assessment" UI action field which is under related link as  mandatory .  

 

Thanks

 

6 REPLIES 6

Community Alums
Not applicable

Hi @nameisnani ,

Unfortunately, that's not possible.

You cannot make the Related Link as Mandatory.

 

Pratiksha2
Mega Sage

Hello @nameisnani - 

For which conditions do you want the Risk Assessment UI action to be mandatory?

hi @Pratiksha2 

 

In - New State  , UI action has to be mandtory 

Hello @nameisnani -
Try with before insert Business rule when state is New:

  var assessmentinstance = new GlideRecord('asmt_assessment_instance');
    assessmentinstance.addQuery('task_id', current.sys_id);
    assessmentinstance.query();

    if (!assessmentinstance.next()) {

        var message1 = '* Please perform Risk Assessment before requesting approval*';
        var message2 = message1.fontcolor("red");
        gs.addInfoMessage(message2);
        current.state = -5; //check state value THIS IS 'NEW' STATE

    }

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Pratiksha