How to customize workflow's action to modify data in another custom table?

  • 7 February 2023
  • 3 replies

Userlevel 1

There is a Quick Checks screen (AP304000). It is maintained with predefined workflow.
I need to customize some actions of the workflow.
Just in case, I use 2022 R1 version.

Examples, to be specific with my customization needs:

  1. When is invoked the Release action, I need to write the quick check amount to my custom table.
  2. When is invoked the Void action, I need to delete the amount from my custom table.

I don't need to change the workflow. I need to expand activities that are done by the present actions.

If to customize actions properties with the customization editor. On the Field Update tab I have access to the fields of the Quick Check screen only.
When to customize via code. There is no place to declare action body.


I know how to extend a regular graph action – declare delegate, then in the extended method invoke base method.
But how to extend an action of a workflow?


Best answer by gprice27 7 February 2023, 18:16

View original

3 replies

Userlevel 3

Hi Olexandr

I think you will find it easier to over-ride either the Persist event of the graph - or if you look at the Release delegate - you will find a public ‘AfterRelease’ method that you can plug into/over-ride with a graph extension.

It is generally easier to just use the existing methods to add your changes than to modify the workflow



Userlevel 1

if you look at the Release delegate - you will find a public ‘AfterRelease’ method that you can plug into/over-ride with a graph extension.

Well, for visual editor the problem stays.
<Fields to Update After Transition> grid has the only fields from the Quick Check screen.
For via code in workflow class, I guess, the same situation.

I think it is not possible yet.
Or should be some gimmicks to do this.

Or it should be done as usual: via graph extension, via declaring a delegate and then declaring an extended method.

Userlevel 3

Hi Olexandr


Yes - I think you need to do this via graph extension

FYI - all the ‘Release’ process happens in APDocumentRelease

public virtual List<APRegister> ReleaseDocProc(JournalEntry je, APRegister doc, bool isPrebooking, out List<INRegister> inDocs)

There is a call to RaiseReleaseEvent(doc); in this proc. This is a protected method but it is possible to over-ride this and create a delegate to do your ‘thing’ on this event..

Also - you can always just hook into the Persist event or RowPersisting event to do you updates to your custom DAC


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved