When you launch the form by passing the form ID to CBXFORMCONTAINER.getWindowByFormId, the request model ID cannot be provided at runtime and therefore, ensure to map the request model ID to the self-designed form (EMP_DETAILS_FORM). You must provide the container ID in the code. If you are providing the custom container ID (EMP_DETAILS_FORM_CONT), you will have to wire the form container actions to the Request Modeler actions, if required. If you want the model container to display, then provide the model container ID.
Code Block |
---|
|
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK, function(config)
{
CBXDOWNLOADMGR.requestScripts(ctcanvas.downloadProvider.getMergedArray([
"FORM_CONTAINER", "WSPACE_PREF_FORMS"]), function()
{
CBXFORMCONTAINER.getWindowByFormId("EMP_DETAILS_FORM", "EMP_DETAILS_FORM_CONT");
});
});
/* Here, EMP_FORM is the workspace menu. EMP_DETAILS_FORM is passed as the
* form ID to launch it from the menu in the custom container.
*/ |