Skip to main content
Answer

Approval Map in Custom Screen

  • January 24, 2023
  • 1 reply
  • 412 views

Hello,

 

I want to implement an approval map in a custom screen but I can't do it,

 

I found this link

https://stackoverflow.com/questions/32400353/how-to-work-with-assignment-and-approval-maps-in-acumatica-via-automation-steps

but with this example when I want to create a new document that will be approved I get the error

“Object reference not set an instance of an object”

 

I also found this other link

https://www.acumatica.com/blog/implementing-approval-process-on-custom-screens/

but the information is incomplete and a bit outdated

Best answer by Yuriy Zaletskyy

I will tell you my recipe, which you may not like to the full, but that was only which worked for me, and for three different teams, where I was involved, and were we used approval maps.

Manuals, mentioned by you inherit from Acumatica base classes. If you want to understand, in which of classes, error happens, then create your own classes, and copy/paste into these classes source code of Acumatica classes from App_data/CodeRepository folder. 

For example you can replace EPApprovalAutomation with EPApprovalAutomation2, and so on. Also you may copy/paste code for other classes. And then use magic of debugger, in order to find out, which part of code throws you an error. And based on that, you can find out, what you need to do. Either add some information to database, or maybe modify/extend basic Acumatica logic. From experience I can say that on average it takes ±3 days to figure out most ins and outs of that, unless you want drastically modify approval maps behavior. Sorry for not being able to give you go and use approach, and just giving you long way to go. Unfortunately approval maps require plenty of efforts, as they consist of multiple ingredients, and to find out, which of ingredients fails, or most probably which combination of ingredients fails require plenty of efforts in any case.

 

1 reply

Yuriy Zaletskyy
Jr Varsity I
Forum|alt.badge.img+3

I will tell you my recipe, which you may not like to the full, but that was only which worked for me, and for three different teams, where I was involved, and were we used approval maps.

Manuals, mentioned by you inherit from Acumatica base classes. If you want to understand, in which of classes, error happens, then create your own classes, and copy/paste into these classes source code of Acumatica classes from App_data/CodeRepository folder. 

For example you can replace EPApprovalAutomation with EPApprovalAutomation2, and so on. Also you may copy/paste code for other classes. And then use magic of debugger, in order to find out, which part of code throws you an error. And based on that, you can find out, what you need to do. Either add some information to database, or maybe modify/extend basic Acumatica logic. From experience I can say that on average it takes ±3 days to figure out most ins and outs of that, unless you want drastically modify approval maps behavior. Sorry for not being able to give you go and use approach, and just giving you long way to go. Unfortunately approval maps require plenty of efforts, as they consist of multiple ingredients, and to find out, which of ingredients fails, or most probably which combination of ingredients fails require plenty of efforts in any case.