Missing Review Record Button RITM on CSTASK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 12:40 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2024 12:14 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 12:29 AM
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.