Skip to main content
Solved

Custom Event on new objects


Forum|alt.badge.img+4

Hello there!
 

I’m trying to build a custom event that triggers after a new object is created and it updates a field value of this new object.

 

However, when the system trigger the event it doesnt update the new object field, it does on the previous object.
 

Event

This event has the following action

SQL:

UPDATE FISCAL_NOTE_TEMP_TAB

SET OBSERVATION2 = 'seu texto aqui teste sem função'

WHERE FISCAL_NOTE_ID = (

SELECT MAX(FISCAL_NOTE_ID)

FROM FISCAL_NOTE_TEMP_TAB


)

Any ideas of how to build/ fix this?

Best answer by Abdul

@MHRDonato, direct update is not possible with object creation.

Either you should update mentioned field by calling background job through Custom Event or you configure custom event for some other action to update mentioned field after creation of object.

 

View original
Did this topic help you find an answer to your question?

Abdul
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • January 28, 2025

Hi Murlio,

The system is updating the previous object correctly since your code asking to do so only.

In IEE version, you can set a default template for new object creation and pass default value for Observation 2.

 

Regards

Abdul Rehman


Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • January 28, 2025

@Abdul Thank you for your response.

 

I have also tried that, but I the system doesnt allow me to click at the option.

As comlementary Information I’m working in a Brazil’s project at the Fiscal Note 

 


Abdul
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • January 28, 2025

@MHRDonato, direct update is not possible with object creation.

Either you should update mentioned field by calling background job through Custom Event or you configure custom event for some other action to update mentioned field after creation of object.

 


Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • January 29, 2025

@Abdul , Thank you for the responses.

I could do it using the background job, as you mentioned.
 

Sincerely yours Murilo.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings