Skip to main content
Solved

Modifying a custom field from an event on the base logical unit

  • January 10, 2022
  • 1 reply
  • 606 views

Forum|alt.badge.img+2

Hello, I have a custom field on the “Mixed Payment” logical unit.

I have an event that triggers when a mixed payment is changed. What would be the best practise to edit a custom field tied to this same mixed payment that is being changed ?

From what I could find, I can update the custom field via the MIXED_PAYMENT_CFP package calling the mixed_payment_cfp.cf_modify__ method.

However, I need to provide the OBJID field of the mixed payment, which isn’t available part of the event attributes. As a work around, I am getting the OBJID with a cursor and passing it to the modify which then caused mutating table errors.
I went around it using the instruction “PRAGMA AUTONOMOUS_TRANSACTION” but I was wondering if there was a better way? I am on apps9.

Best answer by Charith Epitawatta

Hi @jdorval,

Have a look at following thread about pretty much the same topic, which basically discusses about using background jobs and autonomous transactions to achieve this:

Hope this helps!

1 reply

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31

Hi @jdorval,

Have a look at following thread about pretty much the same topic, which basically discusses about using background jobs and autonomous transactions to achieve this:

Hope this helps!