cancel
Showing results for 
Search instead for 
Did you mean: 

How to save the value while saving the doc ?

Former Member
0 Kudos

Hi

I created an extended field in Rfx page . I am taking the page to edit mode and changing some value and that value is to be set to the extended field . I want to set this value while clicking the save button.For this I created a document life cycle event and target as SAVE.

But while clicking the save button the following error is appearing

"Your Rfx has been changed by the <logged in user> and can not be saved. Please discard the changes and reload the page again"

For saving I am using the following code-

doc.getExtensionField("year1").set(start_date_year" ""/"" "calc);

doc.getIBeanHomeIfc().save(doc);

Regards

Sudipta

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Do NOT write code to save the doc on the save context of the same doc. it will lead to recursive calls and you will get unpredictable results.

if your objective is to edit some values in the doc and want the changes to be saved on click of save. Just place the script in the Validate context of the doc. Make the changes in the extension fields, but DO NOT write code to manually save it.(i.e avoid doc.getIBeanHomeIfc().save(doc)) Let the system handle the save on click of save.

This should fix your problem.

Regards,

Immanuel

Former Member
0 Kudos

Hi Sudipta,

Your Question is same as that of Swastik in thread :

Please refer above link for Solution.