g_approval_form_request and $sp.getRecord(); on EC portal

Yathvika
Tera Contributor

We are working on showing the RITM approvals in My Tasks page-EC pro portal
Using the OOB 'Todos Requested Item Approval' widget in Todos configuration , we are able to show only variables not the fields of the RITM.  So trying to show all the variables and fields by using custom widget(which is OOB- Approval record).
So in this widget they are using a function 

g_approval_form_request = true;
var gr = $sp.getRecord();
data.tableLabel = gr.getLabel(); 
 gs.info("Table name is "+ data.tableLabel);
- when I tried to execute the logs we are getting the Approval as a Table label.


But using the same code in Todos requested item widget(EC core scope) doesn't seem to execute the code . It is throwing an error as ErrorServer JavaScript error Cannot convert null to an object. 

 

So I have a query whether the g_approval_form_request = true or $sp.getRecord(); can be used in other scoped applications? or something g_approval_form_request needs to be setanywhere ? I believe we are not able to get the desired o/p only because of these .

Please suggest

0 REPLIES 0