New button needs to be disable for group 'A-Fulfillers', for a customer table created.

LVPhanee
Tera Contributor

I have a requirement like 

''

in catalog tasks when we click on the SCTASK it will open form. in form we have a related list for custom create table 'metals tasks' requirement : when sctask state is 'completed' or 'cancelled' then for Fulfiller group New button should not appear.

''

can anyone guide me how to write a UI Action for this? Is UI Action the best one or suggest another. 

2 REPLIES 2

Anurag Tripathi
Mega Patron

HI,

Navigate to the form containing the related list.
Right-click the related list header and select Configure > List Control.
If the Omit new condition field is not visible, configure the form layout to add it.
In the Omit new condition script box, write your script to return true to hide the button or false to show it.
Example Script (Hides button if Parent is 'Closed'): answer = (parent.state == 'closed');.

 

 

-Anurag

Nilesh Pol
Kilo Sage

@LVPhanee To hide the 'New' button on the 'metals tasks' related list within a Catalog Task (sc_task) form when the task is 'Closed Complete' or 'Closed Cancelled', you should use List Control. This method allows you to script the visibility of the "New" button based on the parent SCTASK record's state.

 

  • Navigate to a Catalog Task record.
  • Right-click on the header of the 'metals tasks' related list and select Configure > List Control.
  • Ensure the form is in Advanced View (if not, click the Advanced View related link).
  • Check the Omit new condition box.
  • In the Omit new condition script field, enter the following code:
    • // Define the states to hide the button (Closed Complete = 3, Closed Cancelled = 4/7)
      // Please verify the exact values of your completed/cancelled states
      var state = parent.state;
      if (state == '3' || state == '4' || state == '7') {
      answer = true; // Omit (hide) the button
      } else {
      answer = false; // Show the button
      }
  • click update.