Every time field is updating its value

Hello Experts
I am using one logic hook after_save to generate Auto increment Id for my Accounts. Problem is when i edit record or update record using inline editing then it increase the id to +1.
What should i do so that it don’t get change even when i am updating record or editing it.

Thank you so much to all who are here to help.

You need to add some condition in the logic hook that can tell the difference between the two cases (inline edit vs. record creation)

Have a look at the fetched_row value, see examples of usage here:

Great! it works fine . Thank you so much sir

1 Like