Cancelling saving of form in preSave event

I am performing cross field validation before saving the form (in preSave event) and want to cancel the saving of the form. I have tried returning 0, false, but nothing seems to work and the form is saved anyway. How can I cancel the saving of the form?

Can you explain what you meant by Saving of the form.. Are you using File -> Save (or) placing a button on the form and on the click of it you atre trying to save the form?
Thanks
Srini

Similar Messages

  • "Presave" Event triggered when the form is loaded.

    Dear all,
    I created an interactive form with an XML interface and I use it into a Web Dynpro ABAP.
    The version of my Adobe LiveCycle Designer is 8.0.
    My problem is that the "presave" event is triggered when the form is loaded.
    For example, if I place a field in the form and add the script " this.rawValue = "123"; " to the "presave" event of this field, the field will have the value "123" when I launch the Web Dynpro application.
    Then, if the user does not make any input and directly save the form, the "presave" event is not triggered.
    Does anyone know why I get such a behavior?

    Steeven, I was unable to test this scenario as Adobe Credentials are not installed in my system. But something similar from Java Script is referenced here in the below mentioned link.
    Please look if you find it useful:
    http://careerabap.blogspot.ca/2011/02/custom-dialog-box-message-while-saving.html
    Please reward if you find it useful.
    Regards,
    Nitin.

  • Cancel saving from Presave event in case validation fails

    I am checking some custom validation on my pdf form. If they fails then I don't want user to allow saving of form.
    I tried following code on
    ArrayOfDeclarationData::preSave - (JavaScript, client)
        if ( !ArrayOfDeclarationData.Page1.variables.ValidateField.ValidateMandatory() && !ArrayOfDeclarationData.page2.variables.DeclValidate.ValDeclPages())
    xfa.event.cancelAction = true;
    but I have noticed that event is not getting cancelled and user is still able to save form. Even xfa.event.cancelAction is always false even after setting it to true.
    Please help me on this issue as I have to only allow user to save user from menu / (ctrl + s) if validation passes.
    Thanks
    Abhi
    [email protected]

    Hi,
    It's not possible to cancel a save action, sorry.
    In the documentation you might have read, that cancelAction will also work for preSave, but this is not true. It's a bug in the documentation.

  • Could someone help me figure out why after saving a form some subforms are hidden again

    I am asking this on behalf of a coworker.  We have a form she is working on with a drop down (ddlDropDown) with 1, 2, and 3 listed (same values,,1,2,3)  That trigger hidden subforms to appear (Employee1, Employee2, Employee3).  Initially, Employee1 is visible.  If form user selects 2 or 3 in the dropdown then Employee2 and Employee3 become Visible.  Once the form is filled in, saved, closed and reopened Employee2 and Employee3 are hidden again even though the dropdown says 2 or 3.  The script behind the dropdown's change event is:
    subSELECT.Employee1.presence=this.rawValue==1?"visible":"hidden";
    subSELECT.Employee2.presence=this.rawValue==2?"visible":"hidden";
    subSELECT.Employee3.presence=this.rawValue==3?"visible":"hidden";
    I have tried adding this code to the form's initialize, docReady, preOpen, postOpen, layout:ready events but it still doesn't work.
    Any ideas?

    Here is a sample I created based on your comments and it works just fine for me after saving the form.
    Employee2 and Employee3 subforms have their presence property set to hidden.  I have the script in the exit event of the dropdownlist.
    Here is the sample:
    https://workspaces.acrobat.com/?d=YWMOMIyD2lLEqPSdO0vqYQ

  • Trying to use exportData method during preSave event

    Hi,
    I'm using LiveCycle Designer ES2 and Acrobat X Pro. I'm trying to create a PDF form that will import and export data from an XML file - specifically, import upon opening the form, and export upon saving the form. The document will be very limited in scope so I have it certified. The users of the form also have the latest Adobe Acrobat. The users should not be aware of the importing and exporting - they are only going to be saving the document.
    I was able to get the form to import the data successfully with the following code:
    topmostSubform.Page1::docReady - (JavaScript, client)
         xfa.host.importData("document_data.xml");
    However, I cannot get this to work:
    topmostSubform.Page1::preSave - (JavaScript, client)
         xfa.host.exportData("document_data.xml");
    When I save the PDF from Acrobat, nothing happens and the Javascript Debugger reads:
    RangeError: Invalid argument value.
    Doc.exportXFAData:-1:XFA:topmostSubform[0]:Page1[0]:preSave
    I tried adding 0 as an optional second argument to the function that indicates the format is XML, but the problem was the same.
    I also tried seeing what happened when I used FormCalc code, and a very vague message comes up when I try to recertify and save:
    "Script failed (language is formcalc; context is xfa[0].form[0].topmostSubform[0].Page1[0])
    script=xfa.host.exportData("document_data.xml")
    Error:         " [no error message]
    If what I'm trying to do is impossible for whatever reason, another solution would be for the PDF to import the data only the first time it's opened, and then just keep any modifications saved within the PDF. This was actually the first thing I tried to do, but I couldn't figure out how to make that work without putting a button on the form (seems like a waste of space since the button would only be used once).
    I'd greatly appreciate any ideas or advice!

    If you supply a filename (and path) to the exportData() method, you will need to certify the form in order to have it work.  In this case, Preserving script changes cannot be automatic. saving a file silently is a secrity risk.
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001341.html

  • Validation in Form Data add Event

    Dear All,
    I am developing an add-on m facing some problems in the Form_Data_ADD Event. I have created a form using screen painter and i have done some validations for few fields those fields are mandatory. after entering some data iam closing the form it will show a messageBox saying do you want to save the changes or not n if i give yes its saving data. but it has to show the error message saying certain fields are mandatory.please suggest some solution regarding how to validation in such a condition.
    Regards,
    Anand.

    Hi Anand,
    I do my validations either in the Form Data Add event, when BusinessObjectInfo.BeforeAction = True or in the ItemPressed Item Event, when pVal.BeforeAction = True. In both cases, if I need to stop b1 from adding the record, I set BubbleEvent to False.
    I guess that in your case it's not working because you're catching the BusinessObjectInfo.BeforeAction = false or because you're not setting BubbleEvent to False.
    Regards,
    Vítor Vieira

  • How does the preSave Event work?

    I want to be able to use the preSave Event to save an uneditable copy of my form to email to customers. But I'm not sure how to do this. I want to be able to create basically a 'read only' version of my form.
    Can anyone help?

    What do you mean by "return method"? Methods return a value (or void, but that's still a "value" of sorts).
    Returning a Value from a Method
    http://java.sun.com/docs/books/tutorial/java/javaOO/methoddecl.html

  • FRM-92010 Error while saving a form in HRMS

    Hi,
    I created a new 12.1.1 instance and impletented HRMS as per doc id#145837.1.
    Applied patch 8934107, Ran DataInstall and hrglobal.drv.
    Now while saving the forms we are getting the following error: (in application.log)
    10/05/13 18:12:03.269 formsweb: Forms session <1> aborted: unable to communicate with runtime process.
    10/05/13 18:12:03.270 formsweb: Forms session <1> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
    at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
    at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
    I have also applied patch 8682249 as per doc 867501.1 (since error was the same) but still no luck.
    Please help.
    Regards,
    Neeraj
    Edited by: user556153 on May 13, 2010 6:19 AM

    Hi;
    Did you checked
    Queries Error With FRM-92101 In Many NLS Forms [ID 443922.1] << seems similar error like yours
    Forms FRM-92050, FRM-92100, FRM-92101, FRM-92102 Reference Guide [ID 444690.1]
    If its not help please enable trace
    How To Perform System Tracing For All Forms Runtime Processes? [ID 400144.1]
    Regard
    Helios

  • I saved my Form Central spreadsheet file once as a excel file but it will not allow me to save it a second time as an excel file.  It says that I cannot complete this action because the file me be open in another application, but it is not open in another

    I saved my Form Central spreadsheet file once as a excel file but Forms Central will not allow me to save the file a second time as an excel file.  I am informed that I cannot complete this action because the file me be open in another application, but it is not open in another application. What is the problem, and how do I solve the problem.  Thank you. Jeff

    First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
    You can find it here:
    [Ann] Identify Your InDesign File
    If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
    In regards of the script showing a result for InDesign files higher than CS6:
    CS7 = CC v9
    CS8 = CC v10 = CC-2014 or CC2014.1
    Uwe

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • When turning pages in catalog in safari messages comes up "Are you sure you want to send a form again? it then asks if I want to cancel or resend form? what is this and why does it pop up?

    When turning pages in catalog in safari, message comes up "Are you sure  you want to send a form again? It then asks if I want to cancel or resend form? What is this and what am I doing wrong? I'm obviously new to mac.

    You can turn that off if you want ..
    From your Safari menu bar top of your screen click Safari > Preferences  then select the Security tab.
    Deselect:   Ask before sendinga a non-secure form from a secure a secure website

  • Restrict Duplicate entry of record before saving the form

    Hi!!
    I need to validate duplicate entry of ITEM CODE before saving the FORM. Which means, if I have entered an ITEM CODE in a row, the same ITEM CODE should not be allowed to be entered in any other rows. It should throw an error message and should ask to enter another ITEM CODE instead. I did not get the correct logic from the threads.
    Regards
    Mitto

    hey i have a requirement that to restrict duplicate entry in both block(both multi record).the blocks are DEPT(MATER)
    EMP(DETAIL)
    the associated fieds in master block DEPT.DEPT_NO,in detail EMP.EMP_ID .
    I have done' Kevin D Clarke’s calculated item ' both in master and detail block
    its working fine for master block but in case of detail block its only respond to the current session(i.e. if the new value is inserted or save it will restrict another record to be inserted of that last record's value),it does not restrict duplicate value enter ,checking with other existing records(which are saved in earlier session,though after query it is shown on the form)
    can anyone guide me why its not working

  • Problem saving dynamic forms

    We created dynamic forms using LiveCycle. The users download them to their local PC and enter data. After they enter data they can initially save the form to their PC. However, after that initial save they have trouble saving the form. For some users they can save the same form five or six times before getting the error message for other users it can happen at the second attempt to save. We have set the form to have no security.
    The error message is the following:
    This document enabled extended features in Adobe Reader. The document has been changed since it was created and the use of extended features is no longer available. Please contact the author for the original version of this document.

    I discovered an answer to this problem, at least in my case...
    I posted my discovery in another forum topic here:
    David T Bartholomew, "Losing Reader Extension Rights After Saving" #31, 11 Dec 2008 3:45 pm

  • Problem saving XML Forms builder project

    Hello,
    I have extended my xml forms project with some functionalities and now I'm not able to save and generate it. When I'm trying to save the project saving process stops while saving 'GUIModel-Internal.xml'  which is quite big file (~4MB). I can't find the reason which cause that.
    I would be grateful for any ideas.
    Best Regards,
    Michal Maciejewski

    Hi Fallon,
    It was typicall extension with normal changes within the XML Forms Builder. I've added some nodes in Data Schema and then create some controls on Edit and Show form which I connected with the newly created nodes. I know that custom changes in .xsl file will be erased after opening and saving the project within the XML Forms Builder so I'm trying no to do that. Have you got any idea why the project is not saving properly? Is it possilbe that XML Forms Builder could damage some files of my project while saving? After several tries of saving Show form could not be load while opening project. It's quite urgent for me to find solution or cause of this issue.
    Regards,
    Michal

  • Business Rules Do Not Execute When Saving a Form

    When saving a form the attached business rules are not executing. Sometimes we are unable to validate business rules via AAS. When this happens we do a security refresh from Planning to Essbase and Essbase to Shared Services. At other times, we bounce planning and even Essbase and this seems to fix the problem. Today we have tried every combination (bounce planning, Essbase, AAS) and we are able to at least validate biz rules in AAS but we (i.e., users) are uanble to execute the biz rule when they save via the planning form. There are no issues running the biz rules when saving the form using an administration account. Can someone explain what's going on or provide direction as to why this problem happens and how to fix this issue?

    Hi,
    Well is your version 9.3.0.1? If yes then you have my sympathies :). We too have this version and face similar problems with Business Rules. Usually things come back to normal after following the steps mentioned above. However what I would want to know is the following:
    1) From where are you running the Business rules? I am asking this because if you are trying to run from Smartview then I would suggest you look at the time it takes for the Business Rules to execute. If it excedes the timeout settings then it will exit out. However the BR might still be running in the back ground. This you can confirm by looking at the data.
    2) Have you checked if you have installed all the patches?
    Hope it helps.
    Regards,
    Amol

Maybe you are looking for