Missing Review Record Button RITM on CSTASK

sugiyanto
Tera Contributor

sugiyanto_0-1720769749012.png

 

Hi Community, my names Sugiyanto from Indonesia. this is my first post on now community. My case : when I open SCTASK, I change RITM number become Read Only, but after this changed, the icon review record is disappear.  question is how to set RITM number read only and review record still appear ?

Thank you

2 REPLIES 2

Deepak Shaerma
Kilo Sage

Hi @sugiyanto 
This is usually happens when the field is dot walking from RITM table to Task table, The disappearing icon is likely due to how read-only state is being applied to the field.

To achieve this, you can use a Client Script :
Identify the Field Name: First, confirm the actual field name of the RITM number, which might be something like request_item or ritm.

2. Create a Client Script:
- Navigate to the form in question.
- Right-click the form header and select Configure > Client Scripts.
- Click New to create a new Client Script.

3. Clear the new Client Script Template:
- Fill in the necessary fields like “Name”, “Table”, and “Type” (usually onLoad).

 

 // The name of the RITM field, replace ‘request.number’ with your field name
var fieldName = 'request.number';

       // Set the field as read-only
       g_form.setReadOnly(fieldName, true);

       // Ensure the link icon is still visible
       var fieldElement = g_form.getControl(fieldName);
       if (fieldElement) {
           fieldElement.closest('div').style.position = 'relative';
           fieldElement.style.pointerEvents = 'none'; // Disable modification but show the icon
       }

 




Hi @Deepak Shaerma thanks for your answer. I already tried using code above, for Read Only it's running well, but for show the icon still disappear. below the capture of my client script. 

sugiyanto_0-1720941961607.png