Skip to main content

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?

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


@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 

 


@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.

 


@Abdul , Thank you for the responses.

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

Sincerely yours Murilo.


Reply