Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This method executes on load. Enables and disables Ready-To-Send button in the BPF Window based on the send-to-reviewers' status.
- * @param {*} executionContext
- */
- function lockReadytoSendOnChange(executionContext)
- {
- var formContext = executionContext.getFormContext();
- if(formContext.getControl("nofo_step7sentreviews") != null && formContext.getControl("nofo_step7sentreviews").getAttribute().getValue() == true)
- {
- if(formContext.getControl("header_process_nofo_step7readytosend").getAttribute().getValue() == true)
- {
- formContext.getControl("header_process_nofo_step7readytosend").getAttribute().setValue(false);
- }
- formContext.getControl("header_process_nofo_step7readytosend").setDisabled(true);
- formContext.ui.clearFormNotification("LoopInProgressMessage");
- formContext.ui.setFormNotification("Stage cannot be moved while the review loop is in-progress. Fields on the right pane will be locked until the review loop is complete.","INFO","LoopInProgressMessage");
- }
- else if(formContext.getControl("nofo_step7sentreviews") != null && formContext.getControl("nofo_step7sentreviews").getAttribute().getValue() == false)
- {
- formContext.getControl("header_process_nofo_step7readytosend").setDisabled(false);
- formContext.ui.clearFormNotification("LoopInProgressMessage");
- }
- }
- /**
- * This method gets executed on load. If step 7 loop has been initiated for either B/O or reviewers(OFAM/OB/Other), additional review section
- * is set to visible else it hides it.
- * @param {*} executionContext
- */
- function showHideStep7LoopOptionsOnChange(executionContext)
- {
- var formContext = executionContext.getFormContext();
- if(formContext.getControl("nofo_step7loopsendtobo").getAttribute() != null && formContext.getControl("nofo_step7loopsendtoreviewers").getAttribute() != null)
- {
- if(formContext.getControl("nofo_step7loopsendtobo").getAttribute().getValue() == true || formContext.getControl("nofo_step7loopsendtoreviewers").getAttribute().getValue() == true)
- {
- formContext.ui.tabs.get("additionalreviews").sections.get("Step7ReviewLoopOptions").setVisible(true);
- }
- else
- {
- formContext.ui.tabs.get("additionalreviews").sections.get("Step7ReviewLoopOptions").setVisible(false);
- }
- }
- }
- /**
- * If step 7 loop has been initiated for either B/O or reviewers(OFAM/OB/Other), additional review section
- * is set to visible else it hides it. Invoke from New UI customization.js
- * @param {*} formContext
- */
- function showHideStep7LoopOptions(formContext)
- {
- if(formContext.getControl("nofo_step7loopsendtobo").getAttribute() != null && formContext.getControl("nofo_step7loopsendtoreviewers").getAttribute() != null)
- {
- if(formContext.getControl("nofo_step7loopsendtobo").getAttribute().getValue() == true || formContext.getControl("nofo_step7loopsendtoreviewers").getAttribute().getValue() == true)
- {
- formContext.ui.tabs.get("additionalreviews").sections.get("Step7ReviewLoopOptions").setVisible(true);
- }
- else
- {
- formContext.ui.tabs.get("additionalreviews").sections.get("Step7ReviewLoopOptions").setVisible(false);
- }
- }
- }
- //Listener is trying to get the message send from Html Webresource
- function AddListener(executionContext) {
- var fc = executionContext.getFormContext();
- // For All browsers except Internet Explorer.
- if (window.XMLHttpRequest) {
- window.parent.addEventListener("message", function(event){ receiveMessage(event,fc); }, false);
- } else {
- //ie
- window.parent.attachEvent("onmessage", function(event){ receiveMessage(event,fc); });
- }
- }
- //Method that gets executed when an HTML web resource is clicked
- function receiveMessage(event,fc)
- {
- // btnclick values are set in the HTML webresource code.
- var btnClick = JSON.parse(event.data);
- if(btnClick.value == "Step7SendReviews")
- {
- // Step 7 Innitiate review
- var stepNO = 7;
- step7SendReviews(fc,stepNO);
- }
- if(btnClick.value == "CompleteReview")
- {
- // Step 7 Complete entire review loop.
- var stepNO = 7;
- step7CompleteReview(fc,stepNO);
- }
- if(btnClick.value == "CompleteOtherReview")
- {
- // Step 7 Complete Other loop review
- var stepNO = 7;
- step7CompleteOtherReview(fc,stepNO);
- }
- if(btnClick.value == "Step8SendReviewstoDGPandBO")
- {
- // Step 8 Initiate review for DGP and B/O
- // Step 8 - Send to BO and DGP ID = 21BD4531-FFEF-4814-B257-DBDADE262A48
- var stepNO = 8;
- var promptMessage = "This action will initiate a review loop. For DGP and B/O, this action will create task and send emails. Do you want to proceed?";
- var workflowID = "21BD4531-FFEF-4814-B257-DBDADE262A48";
- Step8InitiateReviewWorkflow(fc, promptMessage, workflowID, stepNO);
- }
- if(btnClick.value == "step8SendReviews")
- {
- // Step 8 Initiate review for DGMO, DIR and OB
- // Step 8 - Send Reviews DGP Workflow
- var stepNO = 8;
- var promptMessage = "This action will initiate a review loop, create tasks and send emails. Do you want to proceed?";
- var workflowID = "D7C4A0B1-3F3C-4072-9B5F-3AB171E15843";
- if(validateFormStep8Fields(fc))
- {
- Step8InitiateReviewWorkflow(fc, promptMessage, workflowID, stepNO);
- }
- else
- {
- fc.ui.setFormNotification("At least one reviewer (DGMO, DIR, OB, Others) needs to be selected to initiate the review loop.", "ERROR", "missing fields");
- setTimeout(function() {
- fc.ui.clearFormNotification("missing fields");
- }, 10000);
- }
- }
- if(btnClick.value == "Step8CompleteReview")
- {
- // Step 8 complete review loop.
- // Step 8 - Watch for Complete Review and reset fields - 443698F6-4570-496F-A514-162F68CE4FB5
- var stepNO = 8;
- var promptMessage = "This action will complete the loop. If there are any open reviews, this action will close all the tasks. Do you want to proceed?";
- var workflowID = "443698F6-4570-496F-A514-162F68CE4FB5";
- Step8CompleteReviewWorkflow(fc, promptMessage, workflowID, stepNO);
- }
- if(btnClick.value == "Step8CompleteOtherReview")
- {
- // Step 8 complete review loop.
- // Step 8 - Watch for Complete Review and reset fields - 443698F6-4570-496F-A514-162F68CE4FB5
- var stepNO = 8;
- var promptMessage = "This action will complete the Other review loop. Do you want to proceed?";
- var workflowID = "F4E64E24-3629-4BB4-B888-01E3B9343D7A";
- step8CompleteOtherReview(fc, promptMessage, workflowID, stepNO);
- }
- }
- /**
- * This function starts progress indicator and runs until close function is called.
- */
- function openProgressIndicator()
- {
- Xrm.Utility.showProgressIndicator("Loading...");
- }
- function closeProgressIndicator()
- {
- Xrm.Utility.closeProgressIndicator();
- }
- /**
- * This method completes the Other review loop. DGP can perform this task by clicking on the complete other review button and then this function will execute.
- * @param {*} formContext
- */
- function step7CompleteOtherReview(formContext, stepNO)
- {
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("none");
- var confirmStrings = { text:"This action will complete the Other review loop. Do you want to proceed?", title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- formContext.getAttribute("nofo_step7loopcompleteotherreview").setValue(true);
- formContext.data.save().then(
- function () {
- //Success function call back
- openProgressIndicator();
- callWorkflow(formContext, "F1FE03A1-A57C-4DFF-BA29-75CB360777BF", stepNO);
- refreshReviewButton(formContext);
- },
- function () {
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- /**
- * This method completes the Other review loop. DGP can perform this task by clicking on the complete other review button and then this function will execute.
- */
- function step8CompleteOtherReview(formContext, promptMessage, workflowId, stepNo)
- {
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("none");
- var confirmStrings = { text:promptMessage, title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- formContext.getAttribute("nofo_step8loopcompleteotherreview").setValue(true);
- formContext.data.save().then(
- function () {
- //Success function call back
- openProgressIndicator();
- callWorkflow(formContext, workflowId, stepNo);
- refreshReviewButton(formContext);
- },
- function () {
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- function step7CompleteReview(formContext, stepNO)
- {
- /**
- * Complete the loop review by DGP.
- */
- var confirmStrings = { text:"This action will complete the loop. If there are any open reviews, this action will close all the tasks. Do you want to proceed?", title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- if(!validateJustification(formContext))
- {
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("required");
- }
- formContext.data.save().then(
- function () {
- //Success function call back
- // Workflow -> "Step 7 - Watch for Other Reviewed? and Update Fields", ID = 2FE7DE89-88FC-4DA3-9800-DCC63F1CD82F
- openProgressIndicator();
- callWorkflow(formContext, "2FE7DE89-88FC-4DA3-9800-DCC63F1CD82F", stepNO);
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("none");
- },
- function () {
- //Error function callback.
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- /**
- * This method starts step 7 review loop. Based on user selection creates task for reviewers through the workflow.
- * @param {} formContext
- */
- function step7SendReviews(formContext, stepNO)
- {
- var confirmStrings = { text:"This action will initiate a review loop, create tasks and send emails. Do you want to proceed?", title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- formContext.data.save().then(
- function () {
- //If Success function call workflow
- var id = formContext.data.entity.getId().replace("{", "").replace("}", "");
- var actionUrl = "nofo_nofoguidancedocuments("+ id + ")/Microsoft.Dynamics.CRM.nofo_Step7LoopActionReadytoSendDGMO";
- if(validateFormFields(formContext))
- {
- openProgressIndicator();
- callWorkflow(formContext, "A3CAAD65-546D-4E9F-B872-51F87138964A", stepNO);
- }else{
- formContext.ui.setFormNotification("At least one reviewer (DGMO, DIR, OB, Others) needs to be selected to initiate the review loop.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- }
- },
- function () {
- //Error function callback.
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- /**
- * This function validates the additional review form field. User needs to select atleast one organization to initiate the review loop.
- * @param {} formContext
- */
- function validateFormFields(formContext)
- {
- var dgmo = formContext.getControl("nofo_step7loopsendtodgmo").getAttribute().getValue();
- var dir = formContext.getControl("nofo_step7loopsendtodir").getAttribute().getValue();
- var ob = formContext.getControl("nofo_step7loopsendtoob").getAttribute().getValue();
- var other = formContext.getControl("nofo_step7loopsendtoother").getAttribute().getValue();
- var bo = formContext.getControl("nofo_step7loopsendtobo").getAttribute().getValue();
- if(dgmo || dir || ob || other || bo){
- return true;
- }else{
- return false;
- }
- }
- function validateFormStep8Fields(formContext)
- {
- var dgmo = formContext.getControl("nofo_step8loopsendtodgmo").getAttribute().getValue();
- var dir = formContext.getControl("nofo_step8loopsendtodir").getAttribute().getValue();
- var ob = formContext.getControl("nofo_step8loopsendtoob").getAttribute().getValue();
- var other = formContext.getControl("nofo_step8loopsendtoother").getAttribute().getValue();
- if(dgmo || dir || ob || other || bo){
- return true;
- }else{
- return false;
- }
- }
- function validateJustification(formContext)
- {
- var boLoopStatus = formContext. getControl("nofo_boloopstatus").getAttribute().getText();
- var dgmoLoopStatus = formContext. getControl("nofo_dgmoloopstatus").getAttribute().getText();
- var dirLoopStatus = formContext. getControl("nofo_dirloopstatus").getAttribute().getText();
- var obLoopStatus = formContext. getControl("nofo_obloopstatus").getAttribute().getText();
- var otherLoopStatus = formContext. getControl("nofo_otherloopstatus").getAttribute().getText();
- var justificationForClosing = formContext. getControl("nofo_loopjustificationforclosing").getAttribute().getValue();
- if((boLoopStatus == "Not Complete" || dgmoLoopStatus == "Not Complete" || dirLoopStatus == "Not Complete" || obLoopStatus == "Not Complete" || otherLoopStatus == "Not Complete" ) && (justificationForClosing == null || justificationForClosing == ""))
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- /**
- * At Step 8 IOA initiates review loop for DGP and B/O. DGP can initiate further to reviewers. This method calls all the Step 8 workflows.
- * @param {*} formContext
- */
- function Step8InitiateReviewWorkflow(formContext, promptMessage, workflowId, stepNo)
- {
- var confirmStrings = { text:promptMessage, title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- formContext.data.save().then(
- function () {
- //Success function call workflow
- openProgressIndicator();
- // passing formcontext and workflow ID to the CallWorkflow method.
- callWorkflow(formContext, workflowId, stepNo);
- },
- function () {
- //Error function callback.
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- /**
- * At Step 8, DGP completes the review loop. This method calls appropriate workflows
- * @param {*} formContext
- */
- function Step8CompleteReviewWorkflow(formContext, promptMessage, workflowId, stepNo)
- {
- var confirmStrings = { text:promptMessage, title:"Confirmation Dialog" };
- var confirmOptions = { height: 300, width: 500 };
- Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
- function (success) {
- if (success.confirmed)
- {
- if(!validateJustification(formContext))
- {
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("required");
- }
- formContext.data.save().then(
- function () {
- //Success function call workflow
- openProgressIndicator();
- // passing formcontext and workflow ID to the CallWorkflow method.
- callWorkflow(formContext, workflowId, stepNo);
- //After completing the loop, hide Biz process, Document tab and additional review tabs
- hideDocumentTab(formContext);
- hideBusinessProcessUI(formContext);
- formContext.ui.tabs.get("additionalreviewsstep8").sections.get("Step8ReviewLoopOptions").setVisible(false);
- formContext.ui.tabs.get("additionalreviewsstep8").sections.get("invokestep8loop").setVisible(false);
- formContext.getAttribute("nofo_loopjustificationforclosing").setRequiredLevel("none");
- },
- function () {
- //Error function callback.
- formContext.ui.setFormNotification("Validation errors needs to be fixed to save the form.", "ERROR", "missing fields");
- setTimeout(function() {
- formContext.ui.clearFormNotification("missing fields");
- }, 10000);
- });
- }
- });
- }
- /**
- * Generic method to invoke a dynamics workflow based on the workflow ID.
- * @param {*} formContext
- * @param {*} workflowId
- */
- function callWorkflow(formContext, workflowId, stepNo)
- {
- var workflowId = workflowId;
- var clientURL =formContext.context.getClientUrl();
- var nofoId = formContext.data.entity.getId().replace("{", "").replace("}", "");
- var data = {
- "EntityId": nofoId
- };
- var req = new XMLHttpRequest();
- req.open("POST", clientURL + "/api/data/v9.0/workflows("+workflowId+")/Microsoft.Dynamics.CRM.ExecuteWorkflow", true);
- req.setRequestHeader("Accept", "application/json");
- req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
- req.setRequestHeader("OData-MaxVersion", "4.0");
- req.setRequestHeader("OData-Version", "4.0");
- req.onreadystatechange = function () {
- if (this.readyState === 4 /* complete */)
- {
- if (this.status === 204 || this.status === 200) {
- var subgrid = formContext.getControl("Step7LoopDetails");
- //alert("workflow executed");
- refreshWebResources(formContext, stepNo);
- showHideStep8SendToDGPandBOOnLoad(formContext)
- formContext.data.refresh();
- closeProgressIndicator();
- Notify.add("Information saved successfully.", "SUCCESS", "testId", null, 30);
- } else {
- //Xrm.Utility.closeProgressIndicator();
- alert(this.status +" " +this.responseText);
- closeProgressIndicator();
- alert("Error executing workflow. Please contact administrator");
- }
- }
- };
- req.send(JSON.stringify(data));
- }
- /**
- * After workflow is invoked web-resources needs to be refreshed.
- * Generic method to refresh based on button control object.
- * @param {*} formContext
- */
- function refreshWebResources(formContext, stepNo)
- {
- var sentReview;
- var compReview;
- if(stepNo === 7)
- {
- sentReview = formContext.getControl("WebResource_Step7SendReviewsButton");
- compReview = formContext.getControl("WebResource_Step7CompleteReviewButton");
- }
- else if(stepNo === 8){
- //alert("refresh step 8 web resource");
- sentReview = formContext.getControl("WebResource_step8SendReviewButton");
- compReview = formContext.getControl("WebResource_step8CompleteReviewsButton");
- }
- if(sentReview.getObject() != null && compReview.getObject() != null)
- {
- var src_rev = sentReview.getObject().src;
- sentReview.getObject().src = "about:blank";
- var src_comp = compReview.getObject().src;
- compReview.getObject().src = "about:blank";
- setTimeout(function () {
- compReview.getObject().src = src_comp ;
- sentReview.getObject().src = src_rev ;
- }, 1000);
- }
- }
- /**
- * This function hide or show "Complete Other Review Button" based on the Other loop status.
- * If status is "Not complete" it makes the button visible else hides it.
- * @param {*} executionContext
- */
- function hideCompleteOtherReviewButton(executionContext)
- {
- var formContext = executionContext.getFormContext();
- var otherLoopStatus= formContext.getControl("nofo_otherloopstatus").getAttribute().getValue();
- //827580004 - 08. IOA Review Final and 827580007 - 07. DGP Prefinal
- var nofoStatus = formContext.getControl("nofo_status").getAttribute().getValue();
- var completeOtherReviewButton;
- if(nofoStatus == "827580007")
- completeOtherReviewButton = formContext.getControl("WebResource_Step7CompleteOtherReviewButton");
- else if(nofoStatus == "827580004")
- completeOtherReviewButton = formContext.getControl("WebResource_step8CompleteOtherReviewButton");
- // "Not Complete's" field value is - 827580000, N/A = 827580002, Complete = 827580001
- if(otherLoopStatus == "827580000"){
- completeOtherReviewButton.setVisible(true);
- }
- else{
- completeOtherReviewButton.setVisible(false);
- }
- refreshReviewButton(completeOtherReviewButton);
- }
- /**
- * This function hide or show "Complete Other Review Button" On load based on the Other loop status.
- * If status is "Not complete" it makes the button visible else hides it.
- * @param {*} executionContext
- */
- function hideCompleteOtherReviewButtonOnLoad(formContext)
- {
- //var formContext = executionContext.getFormContext();
- var otherLoopStatus= formContext.getControl("nofo_otherloopstatus").getAttribute().getValue();
- //827580004 - 08. IOA Review Final and 827580007 - 07. DGP Prefinal
- var nofoStatus = formContext.getControl("nofo_status").getAttribute().getValue();
- var completeOtherReviewButton;
- if(nofoStatus == "827580007")
- completeOtherReviewButton = formContext.getControl("WebResource_Step7CompleteOtherReviewButton");
- else if(nofoStatus == "827580004")
- completeOtherReviewButton = formContext.getControl("WebResource_step8CompleteOtherReviewButton");
- // "Not Complete's" field value is - 827580000, N/A = 827580002, Complete = 827580001
- if(otherLoopStatus == "827580000"){
- completeOtherReviewButton.setVisible(true);
- }
- else{
- completeOtherReviewButton.setVisible(false);
- }
- refreshReviewButton(completeOtherReviewButton);
- }
- /**
- * After workflow is invoked web-resources needs to be refreshed. Only for the complete other review button.
- * @param {*} formContext
- */
- function refreshReviewButton(buttonControlObj)
- {
- //var compOtherReview = formContext.getControl("WebResource_Step7CompleteOtherReviewButton");
- var src_other;
- if(buttonControlObj != null && buttonControlObj.getObject() != null)
- {
- src_other = buttonControlObj.getObject().src;
- buttonControlObj.getObject().src = "about:blank";
- setTimeout(function () {
- buttonControlObj.getObject().src = src_other ;
- }, 1000);
- }
- /*if(buttonControlObj != null && buttonControlObj.getObject() != null)
- {
- buttonControlObj.getObject().src = src_other;
- }*/
- }
- /**
- * Function loads on event change. When user selects checkbox"Send to DGP and B/O".
- * Hides or show "Send to DGP and B/O" button based on the nofo_step8loopsendtodgpbo field value.
- * @param {*} executionContext
- */
- function showHideStep8SendToDGPandBO(executionContext)
- {
- var formContext = executionContext.getFormContext();
- var sendToDGPandBOStatus = formContext.getControl("nofo_step8loopsendtodgpbo").getAttribute().getValue();
- var sendToDGPandBOButton = formContext.getControl("WebResource_sendToDGPandBO");
- //refreshReviewButton(sendToDGPandBOButton);
- if(sendToDGPandBOStatus)
- {
- sendToDGPandBOButton.setVisible(true);
- }else{
- sendToDGPandBOButton.setVisible(false);
- }
- //refreshReviewButton(sendToDGPandBOButton);
- }
- /**
- * Function executes on load. Hides or show "Send to DGP and B/O" button based on the nofo_step8loopsendtodgpbo field value.
- * @param {*} executionContext
- */
- function showHideStep8SendToDGPandBOOnLoad(formContext)
- {
- //var formContext = executionContext.getFormContext();
- var sendToDGPandBOStatus = formContext.getControl("nofo_step8loopsendtodgpbo").getAttribute().getValue();
- var sendToDGPandBOButton = formContext.getControl("WebResource_sendToDGPandBO");
- if(!sendToDGPandBOStatus)
- {
- sendToDGPandBOButton.setVisible(false);
- }
- refreshReviewButton(sendToDGPandBOButton);
- }
- function showNotificationWhenStep8LoopInProgressOnChange(executionContext)
- {
- var formContext = executionContext.getFormContext();
- var step8SentReviews = formContext.getControl("nofo_step8sentreviews").getAttribute().getValue();
- if(step8SentReviews)
- {
- formContext.ui.clearFormNotification("LoopInProgressMessage");
- formContext.ui.setFormNotification("Stage cannot be moved while the revew loop is in-progress. Fields on the right pane will be locked until the review loop is complete.","INFO","LoopInProgressMessage");
- var sendToHHSOMB = formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtoob")
- if(sendToHHSOMB != null)
- {
- formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtoob").setDisabled(true);
- }
- var sendToDGP = formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtodgp")
- if(sendToDGP != null)
- {
- formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtodgp").setDisabled(true);
- }
- }
- else
- {
- formContext.ui.clearFormNotification("LoopInProgressMessage");
- var sendToHHSOMB = formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtoob")
- if(sendToHHSOMB != null)
- {
- formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtoob").setDisabled(false);
- }
- var sendToDGP = formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtodgp")
- if(sendToDGP != null)
- {
- formContext.getControl("header_process_nofo_bp_reviewfinalnofoioa_sendtodgp").setDisabled(false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement