SOW related list type Client declarative action showing error: g_from API not defined in consoleDescriptionWhen a user tries to add a Schedule entry to any Cab Definition in SOW, the New button becomes unresponsive. The issue happened after the upgrade to Zurich from Yokohama. Issue is caused due to following in SOW v8.x versions: On click of client type declarative action, Record list header component invokes "Declarative action client script button clicked" event, which in turn calls List controller's event "Execute declarative action client script". This event doesn't pass the data internally to the Form controller and hence g_form API usage in client script fails.In the earlier list component design in Related Records tab, This event previously internally used to pass the event to Form controller and hence g_form API had the form context and was working.Steps to Reproduce 1. In SOW, open My cab definition2. Fill the fields and set a filter condition at the bottom; no matter what is set here, the issue remains the same. 3. Save the records, a pop-up will appear asking to add Schedule entries. 4. Open Related record, add "Schedule Entries"5. Observe that no new record will be added. Note: The ones (Schedule entries) already there are the ones from beforeWorkaroundTo fix the issue, we need to pass event and data from Related Records to Form controller inside SRP record page. To do the above, follow below steps: Before making any changes, make sure Application scope is set to "Record page for Service Operations Workspace". #1 - Create a sys_ux_event record that will be passing data from Related Records to SRP record page. NOTE: You can skip this step by importing the attached XML "sys_ux_event_fcb55647ff793210c2f4ffffffffff28.xml" in the instance. Go to UX Event table (sys_ux_event) and create a new record.Fill out the fields for the record like so, Label: [SOW] Related Records Declarative action client script button clickedEvent Name: SOW#RELATED_RECORDS_DECLARATIVE_ACTION_CLIENT_SCRIPT_BUTTON_CLICKEDProperties: [ { "defaultValue": "{}", "fieldType": "json", "label": "Data", "name": "data", "typeMetadata": { "schema": { "type": "object" } }, "valueType": "string" } ] Description: A user clicks a declarative action button to execute the client script defined in the action in SOW. Save the record. #2 - Dispatch the event from Related Records page. NOTE: As OOTB Related Records page is locked for customer and editable for maint user only, customer will need to create a duplicate variant of "Related Records" page and set order value of variant lower than OOTB one so that custom variant where the fix will be done gets picked up at runtime. Keep the sysId noted of custom variant UX macroponent definition record that is created. Open the Related Records variant in UI Builder editor.Open menu and go to Open related records -> Open page definition.In the new tab of UX macroponent definition record, scroll down to Dispatched Events field and add the event created in Step 1.Save the UX macroponent definition record.Switch back to UI Builder editor tab, refresh the page.In the body, select "Record List Header" component and switch to Events tab in config panel.In the "Declarative action client script button clicked" event, do the following: Disable the preset event "Execute declarative action client script" for List controller.Add event created in Step 1 and make sure event payload data is mapped for the event. Save the page in UI Builder. #3 - Forward the event in SRP Record page to Form controller. NOTE: As OOTB SRP Record page is locked for customer and editable for maint user only, customer will need to create a duplicate variant of "SRP Record" page and set order value of variant lower than OOTB one so that custom variant where the fix will be done gets picked up at runtime. Open the SRP Record page variant in UI Builder editor.Open menu and go to Open related records -> Open page definition.In the new tab of UX macroponent definition record, scroll down to Composition field, search for 'related_records'. This should bring up the object for Related Records tab, in the definition object (highlighted in screenshot), replace the sysId value with the custom variant macroponent sysId created in Step 2 and save/update the record. Switch back to UI Builder tab and refresh the page. In the body, select "Related records" component and switch to Events tab in config panel.Click on Add event mapping.Select the event created in Step 1 and click continue.In the choose handler step, select Form controller's event "[Declarative actions] Execute client script".In the next configure step, bind data to the event payload to fields like below: Action name: @payload.data.actionNameDeclarative action assignment: @payload.data.assignmentIdClient script: @payload.data.clientScriptDeclarative action model: @payload.data.model Add the event with above payload bindings and save the page in UI Builder. NOTE: Customer will be creating duplicate variants of Related Records and SRP Record page in SOW with the above workaround and hence won't get updates in newer version of SOW in their duplicated variants in future once they upgrade SOW. To switch back to using OOTB pages, they can delete the duplicated variants. - Also, as Related Records variant is getting duplicated and is being used by the SRP Record page variant, Related List type Declarative actions implemented as 'UXF Client action' like "Add" can stop working. The reason for above is the missing UX add-on event mapping pointing to the duplicated variant macroponent of Related Record.Customer will need to create same UX add-on event mapping records with source component field set to "<custom variant name>" for all such declarative actions. E.g., example showing new UX add-on event mapping record for "Add" declarative action on Impacted CIs table. Related Problem: PRB1965623