I want to filter the change approver lookup based on some conditions. I tried to find the module that is responsible for this but couldn't find it. Can anyone help me on this?
When clicking the "Change approver" button the ApprovalDashboardItemViewModel module onChangeApproverButtonClick method is called. This onChangeApproverButtonClick method calls the changeVizierAction method from the BaseVisaProvider module. Lookup opening is performed in this part of code (inside the checkRightCallback callback method):
When clicking the "Change approver" button the ApprovalDashboardItemViewModel module onChangeApproverButtonClick method is called. This onChangeApproverButtonClick method calls the changeVizierAction method from the BaseVisaProvider module. Lookup opening is performed in this part of code (inside the checkRightCallback callback method):
I wanted to implement a funtionality where a validation should happen on click of Approve button. If the valiation fails the approval should not happen.
To achive the above task I tried with the following approaches, on the "UsrReturns" custom object.
Tried to implement "asyncValidate" on "UsrReturnsVisaPageV2", but it didn't work (Seems the approval is happening outside the context of this page). Also not sure what is the use of this page.
Tried to implement validation using Entity Events Layer on the object "UsrReturnsVisa". Although it didn't approve the request, but it didn't throw the exception as well with the following code,
if(true){thrownew Exception("Can not approve");}returntrue;
Tried to implement a custom approval logic using "ApprovalDashboardItemViewModel", but I can not create a replacing schema with this.
So need a way to implement such funtionality. Any suggestions will help.
this is a bad request response returned by the app and we need to see the actual response (from the "Response" tab of the request in the "Network" tab).
To add some logic upon approval you need to replace the "approve" method in the "VisaNotificationsSchema" module (for "reject" actions its "reject" method). You will be in the context of the approval record and you can use data from there to process further with the approval\rejection. So you need to override the logic of these two methods.
We have created replacing schema - VisaNotificationsSchema. In VisaNotificationsSchema we added code to hide "Reject" and "Change approver" buttons. We want to apply it for specified objects . To do it we need to retrieve object Id from Approval. Any suggestions how can we do it?