You need to sign in to do that
Don't have an account?
Bryan Leaman 6
"salesforce.com refused to connect" when submitting for approval causes error msg in trigger
We have a trigger to provide certain validations that were difficult as validation rules (and need to be enforced even when created by pushing through an approval process).
We're also in the process of moving to lightning. So I've placed our VF page in a lightning component, but when the "Submit for Approval" button on the approval related list is used and the result violates the rule in the trigger, we just get a gray screen that looks like a Chrome connection error with the message:
"... salesforce.com refused to connect"
I found that if I postpone the error until the next step in the approval process, then trying to submit the record works and the error is correctly displayed when trying to approve the next step. I suspect this is an issue of using the "Submit for approval" button on a VisualForce page embedded in a lightning VF component.
The custom error message is also handled correctly when using the native lightning submit button.
We're also in the process of moving to lightning. So I've placed our VF page in a lightning component, but when the "Submit for Approval" button on the approval related list is used and the result violates the rule in the trigger, we just get a gray screen that looks like a Chrome connection error with the message:
"... salesforce.com refused to connect"
I found that if I postpone the error until the next step in the approval process, then trying to submit the record works and the error is correctly displayed when trying to approve the next step. I suspect this is an issue of using the "Submit for approval" button on a VisualForce page embedded in a lightning VF component.
The custom error message is also handled correctly when using the native lightning submit button.
--
Magulan Duraipandian
www.infallibletechie.com