Doing CancelAction in PreSave Event of the Form is not working

Avatar

Avatar

SriRamuSr

Avatar

SriRamuSr

SriRamuSr

13-08-2008

Giving the following Code in PreSave Event of Form is not working properly.



xfa.event.cancelAction = true;

xfa.host.messageBox("PreSave - Came In" + xfa.event.cancelAction);



This piece of code always displays the message as "PreSave - Came In false", While execution.



Basically, I am trying to do the following:

I have Right Enabled PDF's, so that User can Save that PDF

Inside the PDF, I have few Fields that should give me a total of 100. [5 Decimal Field's Value equalling 100]

User Opens that PDF and enters value in those 5 fields

If User attempts to save, the Script present inside the PDF will Prompt the User saying that "Valus is not Equal to 100" and also the Script should cancel the Save Event trigerred by the User.



Please give me guidance in doing this...



Thanks in Advance



With Regards

SriRamu SR

Replies

Avatar

Avatar

Ratnesh_Ranjan

Avatar

Ratnesh_Ranjan

Ratnesh_Ranjan

30-08-2012

This property applies only to the following scripting events:

prePrint, preSubmit, preExecute, preOpen, and preSign

Please visit the link for details. http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001046.html