Workflow with Enable /disable in drop down list and submit button in NetIQ

Hi ,

I am looking forward to create a form where I can have enable/disable option and a submit button .

In such a way that when user selects enable option in drop down list and clicks on submit button then IAM checks for some mandatory attributes and perform the enable action or else sends a failure email to the user in case the mandatory attributes are not present . Same applies in the case of disable option as well.

Any suggestions ?


  • Hi Nikita,

    What version of IDM are you using currently? IDM 4.8 and later have new version of forms that can be associated with workflows. Are you trying to create or update an entity using workflow? Do you want the mandatory checks to be performed in the form itself based on enable/disable flag?



  • Hi Suman,

    I am using 4.7 version of IDM currently.

    I am trying to create a new workflow for enabling/disabling the account.

    Yes, I am looking for the basic and mandatory steps in the form itself based on enable/disable flag?

    Please do let me know if u can help ?

  • There is an ECMA function in Forms called interceptAction().

    Docs here:

    They say:

    InterceptAction(actionname, order, function)#

    form.interceptAction("actionname", "order", "function")

    Allows you to intercept the script attached to an action button. The function passed in is executed based on the order parameter.

    Valid actionname values are SubmitAction and CancelAction.

    The choices for actionname for an approval form are: ApprovalAction, RefusalAction, DenyAction, UpdateAction, CancelAction and CommentAction.Valid values for the advice parameter are:Before: The function is called before the script attached to the button executes.after: The function is called after the script attached to the button executes.around: The function is passed a parameter that allows you to decide whether to execute the script attached to the button The following example shows the submit action intercepted. The form is only submitted if the user replies Yes.

    window.inv=function (invocation) { if (confirm( "Are you sure you want to submit?")) { var result = invocation.proceed(); return result; }; };
    form.interceptAction("SubmitAction", "around", window.inv);

  • I would do the check before submit and have the submit button not available from start (grayed out).

    When the user selects enable I woyuld have that trigger a query and have that result written in another field that could be hidden or not.

    If the query comes back with the correct values then submit should be allowed.

    The same logic could apply to disable.

  • Hi ,

    Thanks for replying . I am following the same process, doing the checks before submit button.

    Here in my workflow  , I need to check for an attribute to enable/disable .

    Initiator selects enable option in drop down list >>workflow should  check for that attribute if it is available for that user or not in LDAP >>  if attribute is not present for the user workflow should add the value to that attribute, if it is already present it should throw an error message that it is already enabled.

    So, basically in my workflow there is a particular attribute which is responsible for enable/disable action .

    Could you please help me with the code for ECMAScript  for this requirement ?

    I am not getting how do we check for the attribute here ?


  • It depends on what you need to check.


    Sometimes it's enough to do a read from the user object such as:


     To get the last name and then you could have your logic check for the existance of it.


    In other cases you need to create a query in the DAL:

    That one is more versatile and can do complex cueries in a better way.


    In any case you want to change the approval action from hidden to shown.

    I have this code in a workflow, its more basic and only checks that the user has moved on to the second tab:


    try {
    // onClick
    $(document).on('click', '#_tab1title', function(){
    } catch(e) {
    try {
    // onClick
    $(document).on('click', '#_tab2title', function(){
    } catch(e) {

    You should start with visible false on the approval action. That is a setting on the actual Action command in the gui. Then make it show in the logik.


  • Hi ,

    I want to check for an attribute value in ldap , whether it is available for the user or not.

    I want to check if recipient has attribute or not in my form.

    I am using below code:

    var rcp = form.getValue("recipient");

    var att = IDVault.get(null, rcp, 'entity', 'attribute' );

     if (att == null){
                 var result = IDVault.get(rcp , 'entityr', 'CN') "@" "value";
      var  abc = IDVault.globalList(null, "Alert_enable_success");
      form.setValues("alertAddMessage1", abc[1][0]);


    could you please let me know if IdVault method to check for attribute, is it incorrect ?

    I am getting below error on User Application page :

    An error 'Expected string value for parameter ''dn'' of function ''idvault.get()''.' was encountered while executing the script 'in IDVault.get()'