Application U Purchase License

Jeff W NZAO B
Mega Guru

Hello guys,

 

Is there someone who can help me please,

 

I must create a UI Policy Script to set a condition on a referenced field that have application with 

u_purchase_licence == true.
 
So here is the code I have started, but it doesn't work.

 

function onCondition(onChange, control, oldValue, newValue, isLoading) {
	if (isLoading || newValue === '') {
        return;
    }

    // Get the 'u_purchase_licence' field value
    var purchaseLicence = current.u_purchase_licence;



    if (purchaseLicence('true')) {
        // If 'u_purchase_licence' is true, prevent form submission
		g_form.setVisible('alert_application', true);
        
    } else {
        // If 'u_purchase_licence' is false, display an error message and allow form submission
        
        g_form.setVisible('alert_application', true);
    }
}

JeffWNZAOB_0-1696863401759.png

 

 



Thanks for your feedbacks

 
0 REPLIES 0