InvcGrp updatetable BAQ

Hi,
I try to unlock invoice group using updatable BAQ. however, I receive an error message, please advise

Hi,
With this case I don’t know if you can use BAQ Update. But I got 2 ways to do that.
1 - Call user to login, open this group and click on Clear button.
2 - Use SQL update.

Hi,
I asked person to login and it released the locked group.
How can I tell which table/field can use BAQ Update? Why InvcGrup cannot?

There’s a BPM Erp.InvcGrp.UnlockGroup, which you could invoke from another BPM to unlock it.

I’m not familiar with invoke from another BPM, could you provide some example?

Here’s a down and dirty example.

I made a Post Proc BPM on InvcGrp.IsLocked. This fires every time an InvcGrp is fetched.

  1. Make a variable as shown above.

  2. The condition just checks to see if it is locked.
    image
    You could add a row to it so that it only is true for a specific user (supervisor).

  3. The Show Message was just for debugging.

  4. The Invoke BO Method widget:
    image
    with the configured params of:

Basically it just calls the BO method InvcGrp.UnlockGroup, passing the GroupID as an input (the group to be unlocked). I made the variable tempDS just to have something for the 2nd parameter. It’s never used elsewhere.
The above will unlock the selected group if it is locked. This will happen 100% of the time. So an improvement would be to add showing a BPM form to give the user the choice to unlock it or not.

edit

It goes without saying that this should only be used as a last resort. If the user that locked it is unavailable. If that is the case, it would also be best to end that users session via EAC. That way they can’t have the same group loaded in their client too.

1 Like

I followed the example and I received an error. I guess I still not understand how to use invoke BO.