Skip to main content
Solved

Custom Events

  • April 7, 2026
  • 2 replies
  • 92 views

Tharshan SM
Do Gooder (Customer)
Forum|alt.badge.img+4

Hi, I have come across this issue a few times while creating custom events. If anyone has a solution please let me know.

When there is a custom event for a specific logical unit and I want to validate against a different logical unit that is also created synchronously, I cannot use that validation for the other logical unit because it is also creating synchronously. When I use a cursor for that logical unit it always returns empty. Is there anything we can do to retrieve the data in this scenario?

For example, in the supplier page there is a business operation that allows you to add a new supplier contact. When adding a communication method for the new supplier contact, it first creates the person entity and then creates the communication method entity synchronously. In my case, I created a custom event on the communication method which first needs to check the same person entity values before performing the validation. However, in this scenario when I use a cursor to retrieve the person information it always returns empty as it has not been committed to the database yet. Is there any way to retrieve those values or any alternative approach to achieve this?

Thanks in advance

Regards

 

 

Best answer by Tharshan SM

Hi ​@Edwards ,

Thanks for the response.

The issue is that I was using PRAGMA AUTONOMOUS_TRANSACTION in the custom event code. Earlier I was getting a mutation error on the person page so I used PRAGMA AUTONOMOUS_TRANSACTION to resolve it. When using it I was not able to get the value, but without it I am able to retrieve the value.

Regards

 

 

 

 

2 replies

Forum|alt.badge.img+9
  • Hero (Customer)
  • April 7, 2026

Good day,

 

Can we see your event logic (assuming you are using SQL event action type)? should work fine to get person info if your event is on the comm method. It creates the comm method after the person is created, and since custom events are essentially database triggers, it doesn’t require it to be committed to trigger unless the changes occur in distinct transactions. I have created a small custom event to verify. See below.

 

Thanks,

Lavon


Tharshan SM
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • Answer
  • April 8, 2026

Hi ​@Edwards ,

Thanks for the response.

The issue is that I was using PRAGMA AUTONOMOUS_TRANSACTION in the custom event code. Earlier I was getting a mutation error on the person page so I used PRAGMA AUTONOMOUS_TRANSACTION to resolve it. When using it I was not able to get the value, but without it I am able to retrieve the value.

Regards