Worknotes getting update twice

Tarasingh26
Tera Expert

Hi All,

 

I have requirement to set work notes of related list entry numbers when record is inserted. I created before insert business rule which is working fine sets value of count and worknotes. But when I made first update to record worknotes comes twice and after first update if I made any update work notes comes one time as usual worknotes comes. Please help to resolve this issue why worknotes comes twice when first update is made to record.

Attached is screenshot of issue.

Regards,

Tara Singh

9 REPLIES 9

Using current.update() in before BR can result in unintended results so it is not advisable 
Generally, you do not use current. update() in a Before Business Rule because the record has not been saved yet

Kindly mark it correct and helpful if it is applicable.

Thanks,

Raj

Please check business rules for table. Possibly another business rule would be running on update or insert & updating worknotes.

Kindly mark it correct and helpful if it is applicable.

Thanks,

Raj

Rohit99
Mega Sage

Hi @Tarasingh26 ,You can try with the following line of code.
As you created BR before Insert so validate if it is newRecord then and then it should be update.
if (current.isNewRecord())

{

// Your code

}

 

Please mark my response as correct and helpful if it helped solved your question.

 

Thanks,

Rohit Suryawanshi

@Rohit99 I implemented current.isNewRecord() but still works notes getting updated twice.

@Tarasingh26  can you please check like it may happen if you click on insert and stay and thats why two BR's are created.