Hi all,I have added a call server function on the finish button in a template that generates the data record using iwgen. This was to overcome the problem where the user creates a new dcr, saves it then clicks finish without clicking generate first, as this meant that the generated page was never created.The problem I am encountering now is that when the user opens an existing generated page, edits and saves then clicks finish, it is always asking them if they would like to regenerate. Even though they've just clicked on the finish button it has just generated the page.Does anybody know what stops this message from appearing? I know that if a user opens the templated page, edits, clicks the generate button then clicks finish, the message doesn't appear. So what's the difference between clicking generate in the template and running a generate command via the finish button?thanks,ATS 6.7.1 SP 1
I suggest reading through the FormAPI manual and searching the forums - the means of getting rid of the "do you want to regenerate" message has been documented and/or discussed before.
I think I found a way around this issue, I wait for the onClose event to be triggered then call a function that just uses "IWDatacapture.close();" to close the template without asking the user if they would like to generate. Seems to be doing the trick.
Below is the proper fix for your problem.[...]function close_routine(){ top._dcWin.datacapture_buttonframe.regenerateNeedsTobeDone=false; return true;}
The term "proper" is questionable here...