Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

STATE_ID and VERSION columns in the CT_REQ_MDLR_STATE_MODEL table are primary keys and must be provided in the app view. If not, the requestEdit API cannot be used. 


If the Model ID is mapped to the form, by default the form is displayed in the Request Modeler container. In case the custom form container is used, then explicit wiring is needed to proceed with the request edit, delete or approve sequence. The wiring can be done using the executeAction API. For information on custom action wiring, refer API to Wire Custom Actions in the Self-designed Forms or Form Container to the Request Model Actions section. 


For information on Refer form, app, and menu creation, refer the Expert Studio Dev Guide available in Unmail > Canvas Technology > Documents > Release 18.1.0.0. section for information about creating those in Canvas Studio.

The following screen shot is of the Request Details app which displays the saved, rejected or pending for approval requests. In this example, only Edit and Delete menus have been configured for the app. You can also configure Approve menu for your app as required. 

...

Code Block
languagejs
CMHR.registerHandler("STATE_EDIT", function(resp) 
{
	var obj = {formId : "EMP_DETAILS_FORM", requestMode : "EDIT", containerId : "EMP_DETAILS_FORM_CONT"};
	canvas.modeler.requestEdit(obj, resp);
}); 

/* Here, STATE_EDIT is the menu ID. On clicking edit, the EMP_DETAILS_FORM is launched in a custom 
*  container (EMP_DETAILS_FORM_CONT) using the requestEdit API (Mode being EDIT). The form displays 
*  the details of the row on which the right-click was performed.*/ 

...

Code Block
languagejs
CMHR.registerHandler("STATE_DELETE", function(resp) 
{
	var obj = {formId : "EMP_DETAILS_FORM", requestMode : "DELETE", modContReqd: "N"};
	canvas.modeler.requestEdit(obj, resp);
}); 

/* Here, STATE_DELETE is the menu ID. On clicking delete, the EMP_DETAILS_FORM is launched 
*  in a custom container (EMP_DETAILS_FORM_CONT) using the requestEdit API (Mode being 
*  DELETE). The form displays the details of the row on which the right-click was performed.*/ 

...

Code Block
languagejs
CMHR.registerHandler("STATE_APPROVE", function(resp) 
{
	var obj = {formId : "EMP_DETAILS_FORM", requestMode : "APPROVE", containerId : "EMP_DETAILS_FORM_CONT"};
	canvas.modeler.requestEdit(obj, resp);
}); 

/* Here, STATE_APPROVE is the menu ID. On clicking Approve, the EMP_DETAILS_FORM is launched in a custom 
*  container (EMP_DETAILS_FORM_CONT) using the requestEdit API (Mode being APPROVE). The form displays 
*  the details of the row on which the right-click was performed.* 

...