on 2011 Oct 28 4:54 PM
Dear all,
On the scorecard, i have created an extension collection.
By using a script on the moment of saving this document, I would like to change some rows in this extension.
When I actually save, i can see that the records have been saved, but afterwards, when leaving the scorecard, it seems that the old values are displayed again. When I use the same logic to Add a new row instead of changing one, it works, but i absolutely need to be able to change an existing one. Any idea how this could be caused?
Thanks in advance,
Tom
Request clarification before answering.
Hi,
In what context have you put the script? We had a similar request on the Contract Document page earlier this month. We initially wrote the script in the "Save" context and that was giving us issues on exercising control over the extension collection. As in, we were not able to lock the collection and get rid of the old values.
What we did was to write the script on the "Validate" context instead of the Save and that resolved our issue.
I'd request other scripting experts on the forum to also pitch in with their recommendations.
Thank you,
Vikram Shukla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great feedback Vikram!
Using validate solved the problem.
Thanks a ton!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom,
In addition, I would recomed to post the script code that you used for this collection mofication. Here are some thoughts:
1. just to be sure, Is the parent object in edit mode, while this action is performerd?
2. do you see any errors in the logs or do you have a sorrounding catch block that may potentially catch some interesting exceptions?
3. Try issuing a force save e.g. doc.getHome().save()
Thanks, Baski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.