How do I perform an action just before someone saves a data block?

Hi,
I need a trigger to attach to a datablock to perform some processing before the record is saved. I can't find anything suitable - I can see WHEN-VALIDATE-RECORD but this can run without you saving can't it? The code must only be executed when the user saves.
Can anyone help?
(Forms 6i)
Thanks Adam

Whatever you do, DO NOT use a KEY-COMMIT trigger !
There are many ways a commit can be performed without firing that trigger.
There is also POST-FORMS-COMMIT, which despite its name, fires before commit, ie if form_trigger failure is raised in it, then the commit does not happen.

Similar Messages

  • How to perform validity checks just before form data is saved?

    hello all,
    i need to perform some checks on various fields just before data on a standard form is saved, and to eventually rollback the transaction.
    if the checks are succesful i have to perform some db operation in transaction with main data.
    solution ( if existent! )  has to be addin only -> no triggers / no procedures / no sbo_transaction thingies
    scenario:
    involved tables:
    OITM
    USERDEFINEDTABLE1
    USERDEFINEDTABLE2
    involved forms:
    Items - OITM - formtypeex = "150"
    logic:
    an user defined field U_UDFCHECKACTIVE has been added to OITM, a combo box has been added to items form containing values Y and N, bound to OITM.U_UDFCHECKACTIVE.
    when the user saves an item, if OITM.U_UDFCHECKACTIVE == Y we have to perform additional checks on USERDEFINEDTABLE1
    if the check result is true we have to save OITM current data and insert a record in USERDEFINEDTABLE2 containing itmgrp value (  )
    if the check result is false we have to block save operation
    if OITM.U_UDFCHECKACTIVE == N no check is performed and everything works normally
    we started hooking the form data event for oitm / form type 150:
    Application.SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(FormDataEventHandler.SBO_Application_FormDataEvent);
    then we filtered the event
    switch (BusinessObjectInfo.FormTypeEx)
                        case "150":
                            if (BusinessObjectInfo.BeforeAction &&
                                (BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE ||
                                    BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD))
                                BL.Items_BusinessLogic.SBO_Application_FormDataEvent(ref BusinessObjectInfo, out BubbleEvent);
    in our business logic class i don't know how to correctly check the values just before they are saved to db
    for example i tried using oitm.browser :
    if (oitm.Browser.GetByKeys(BusinessObjectInfo.ObjectKey))
                            String value =  oitm.UserFields.Fields.Item("U_UDFCHECKACTIVE ").Value as String;
                             //perform checks
                                  //if ok insert records and bubbleevent = true
                                  //if ko rollback the bubbleevent = false
    //if checks are not to be performed then bubbleevent = true....
    but it's wrong, as it populates oitm object from db, and not from the form. i have old values stored in the object, values tha are to be overwritten with those present on form.
    i tried inspecting the form for data sources but i don't know how to navigate to the right one, i found only system generated objects with SYS_##, with no clue about the related dbfield
    i tried getting the values directly from the form, but in object BusinessObjectInfo i don't have anything that identifies univocally the form i'm editing.
    i mean if i have 2 item forms open, i don't know which one is the one i'm saving.
    i'm expecting to find somewhere a temporary oitm business object containing values that are to be saved, values that i can easily check.
    so i'm asking you how to find those values in order to perform my bl checks
    thank you in advance

    Hi Christian,
    The values that are about to be saved should be in the datasources:
    form.DataSources.DBDataSources.Item("OITM");
    form.DataSources.DBDataSources.Item("ITM1");
    The form variable should be form 150.
    Best regards,
    Pedro Magueija

  • How to access a session variable just before rendering a JSF page???

    Dear Sirs...
    i am using jdeveloper 10.1.3.2 with JSF and ADF faces. i want to access a session variable and perform some processing just before rendering a page. how can i achieve this????
    i am a little new to jsf, so i feel a little lost
    thanks for any help in advance, and best regards

    <p>
    Hi,
    </p>
    <p>
    See example 60 &quot;<strong>Triggering OnPageLoad-Style Code in a JSF Backing Bean Using ADF PagePhaseListener or PageController</strong>&quot; on Steve&#39;s Muench blog.
    </p>
    <p>
    Kuba 
    </p>

  • How do I set up a .pdf form to save filled data without having to print the form?

    How do I set up a .pdf form to save filled data without having to print the form?  I have provided my clients a lifecycle .pdf form they can use to record data for unique client meetings.  They want the ability to save their completed data whenever they use the form under a unique file name.  I've told them the only way I know how to do this is to print the completed form as a .pdf document and then save it. 
    Is their a way to save the data to a unique file name without printing the filled form?
    Is there a way to reset the form with blank fields after saving? or to add a clear fields button?
    Thanks.

    If you reader extend  a pdf using livecycle reader extensions then you can save the filled in data - this is true if you are using Adobe reader to view the PDF's. If you open it in Acrobat then the functionality is already there.

  • How do I perform an action on return key press in an inputListOfValues?

    I know about the autoSubmit attribute, but I do not want to perform an action on a tab character or when exiting focus. Instead, I want to perform the same action as pressing a button when the user presses the return key in the input field. For example, an inputListOfValues for a search input, and a search button. When the user presses the return key, I would like the search to be performed. I'm sure that this can be done, I'm just not sure how. Thanks for any info.

    I did something similar, on an input box, not on an inputListOfValues, but I assume it should work the same way more or less. I got it from
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_event.htm#DAFBJGAH
    I used it for my login page so the user doesn't have to click on Login, just press enter after entering the password. I just had to map the corresponding method binding.
    BTW, the link above doesn't tell you have to add the javascript to the page. What I did was add an af:resource element inside of af:document.
    Hope this helps.

  • How do I perform an action on a document in a library, before my Event Receiver is fired?

    My scenario:
    Currently when a document is uploaded into a document library, it gets its metadata from the document. But then there is a need to change the title property to satisfy a naming convention which basically concatenates a combination of the information in
    other columns in the document library...right now, there is already a SP designer workflow that is doing this and updating the title field (this was done previously by someone else). Now I want to add an event receiver to the library which will change
    the "name" property of the document. The name will be changed to match the title field (I think I already know how to do this part).
    Here is my problem...if I create an Event Receiver (ItemAdded), my code will not work cause the workflow needs to fire and complete its task before my code can grab the value from the title and copy it into the name. So my question is this....is there
    a way in SP that i can maybe write custom code to address the entire scenario? If so, how do I do this? I read somewhere that I cannot or should not combine a workflow and an Event Receiver...I really appreciate it if I can be pointed in the right direction.

    I think you can use ItemAdding event to update your fields. This works better for you instead of ItemAdded event.
    Bala

  • How to run a script automatically just before Reboot or Shutdown

    Hello all,
    Could someone tell me what folder or what entries to be made if I want an event to take place before the machine actually start the reboot/shutdown process.  For instants, i usually mount my USB flash drive but sometime I forget to umount it, which will cause a dirty file system when restarting the machine.  Would anyone have an example to get me going.  It's just like when rc.conf will do added things for you during start-up if special code/script was inserted.
    There are other things I like to do before the machine reboot or shutdown, like, to run a very small scripts to automatically kill a certain process "first", before the rest and before rebooting.  I'm sure I can write the code but I don't know where it goes.
    Thanks in advance
    PS: Thanks fsckd, Your explanation of SKIP/SEEK for dd has never been explained so well in any documentation, or on ANY web-site I ever been to in 6 months pass.  Now I know how it really works and i'm getting it down to a science.  I did not use it for what my thread indicate because in the end the other suggestions were better, but still I Thank God I finally know how to use SKIP/SEEK in dd.  dd is my most use tool for what I do.

    sharris wrote:
    Wow! I just added this and it works great ...
    cd/     # to move out of the mounted directory if I was in it under another terminal.
    Sleep 1 # give it room to think
    ls     #  to see changed directory on screen
    Sleep 1 # give it room to think
    umount /b     # do the main thing
    Sleep 1 # give it room to think
    There something new every day to learn with this OS.  Just when you get one thing right here's comes another. I guest it took 20 years to build LINUX and I read the kernel has something like 10 - 30 million lines of code or better.  Some how I lost the better link that went much deeper.  30 million lines of code mean billions of documentation to read.  But you still got to find the right one first.  So I guest we read and still have to ask questions just to get to the good parts, and than ...
    http://en.wikipedia.org/wiki/Source_lines_of_code
    Thanks again
    Arch should already automatically unmount your USB drive. If it isn't unmounted, that's a bug and ought to be filed at http://bugs.archlinux.org

  • How do i fix my phone or at least save the data on it?

    I stuck in a bad situation. My phone screen isnt turning on. My power button has been broken for months and my home button isnt working all of a sudden. When I plug the charger in the phone it makes the sound that an iphone usually makes when plugged into a charger but the screen wont turn on nothings working. I also cant back all my data up on my mac because i need the phone to be turned on to do that. how do i fix it i have very important info on my phone that i cant lose.Can i try taking the sim card out and putting it into a new phone? will that work? i have an iphone 4

    Move all the content from the old computer or the backup of the old computer to the new computer.
    iOS devices are NOT backup devices.

  • How to Create a Button for Reader Users to Save XML Data File?

    The "Submit via Email" tries to launching the local email software, like outlook express. But public computer tends to use internet emails.
    I am thinking of creating a button, allowing the reader users to save xml data filled in the form (same as the "submit via email" produces) somewhere.
    anyone has a clue?
    Thanks a lot!

    You could create the shortcut at one machine, then copy it to the target as part of the logon script. Note also that this line contains an error:
    "C:\Users\%userprofile%\Desktop\Org_chart_test.lnk"
    It should read:
    "%userprofile%\Desktop\Org_chart_test.lnk"

  • How to use's mail's "perform mail action with message"

    I can't for the life of me figure out how to use "perform mail action with message", I basically want to create a script that get's used on a rule from Mail, but nothing I try will work.
    This is what I started with...
    tell application "Mail"
    perform mail action with message msgs for rule theRule
    end
    end
    This doesn't compile i've seen an example of it being used like this...
    using terms from application "Mail"
    perform mail action with message msgs for rule theRule
    end perform
    end using
    this also doesn't compile, so I'm not sure what it's wanting

    This is one of those annoying things about programming - you have to arrange and spell things exactly right (this gets worse if you have fat fingers). You can look at the dictionary for Mail to see the specifics - in your example you are missing an "s" at the end of the word "message":
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">tell application "Mail"
    perform mail action with messages msgs for rule theRule
    end tell
    </pre>

  • How to "Performing an Action on Multiple Selected Records" using Struts-JSP

    Hi all:
    How to do "Performing an Action on Multiple Selected Records" through using Struts/JSP solution that is original MVC/UIX customizing example by Jheadstart.
    I know how to reason by analogy through tutorial guide on
    Model and Control layer of MVC , but for View layer that is torment to me !
    have any idea ?
    thanks a lot .

    Ting Rung,
    In the table in the JSP page you add a checkbox like this:
    <td class="fixed">
    <input type="checkbox" name="multiselect" value="<%=index%>"/>
    </td>
    This will render a checkbox in each row, with index number of that row as value.
    When you submit the page the request contains the multiselect parameter when at least one row has the checkbox checked.
    You can get the value of the multiselect parameter by calling sessionData.getRequestParameterValues("multiselect") in your action. The value is a string array containing the index numbers of the rows that have the checkboc checked.
    Steven Davelaar,
    JHeadstart Team.

  • In sqlserver 2005 there short cut ctrl+N, how can i perform same thing in sqlserver 2008 r2

    In sqlserver 2005 there was short cut ctrl+N, how can i perform same action in sqlserver 2008 r2

    In sqlserver 2005 there short cut ctrl+N, how can i perform same action in sqlserver 2008 r2
    ctrl+N still available in SQL Server 2008 R2, please refer below article for list of shortcut keys.
    http://technet.microsoft.com/en-us/library/ms174205.aspx
    Also refer below article for how to customize shortcut keys.
    http://technet.microsoft.com/en-us/library/ms174178(v=sql.105).aspx
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • How to Perform an Action from an outside MouseListener.

    Hi to all,
    The MouseListener Object can be either inside the main applet class or outside it. I want to define the MouseListener object outside the applet class.
    My question is how can the MouseListener object perform the specified action on an mouse event, when it is outside the main applet class?

    By "outside" you mean it's a top-level class, as opposed to a nested class?
    An event handling class is just a class that performs certain required actions. It doesn't need to be an inner class.
    If you're asking how a top-level class can access another class's private data or methods...it can't. So the programmer is required to do the various things that are necessary to control and/or permit access, which one has to do in other cases where one class needs (or seems to need) another class's privates.

  • How do I upgrade my macbook pro to I-Lion without paying, because I bought it three weeks ago just before the release

    How do I upgrade my macbook pro to I-Lion without paying, because I bought it three weeks ago just before the release

    See "More like this" on the right.
    Regards,
    Shawn

  • I lost my MacBook calendar when I performed the action required by 5 May although I have all information on my iPhone and iPad. How do I restore the data on my iCal calendar?

    I have performed all the relevant actions required before 5 May to conform with Apple instructions. I have lost my calendar on my MacBook although all is still OK on my iPhone and iPad. I have tried various ways to restore the data including going to MobileMe but I have been unsuccessful. I have tried to merge the information from my iPhone but this did not work either. My Contacts and mail are all OK. Coincidentally I am also unable to access my external hard drive which is working in itself (it is warm and whirrs when activated) but my back ups are failing. Any ideas out there?

    Hi bsavino2,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    iTunes Store: Changing account information
    http://support.apple.com/kb/HT1918
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Cheers,
    - Judy

Maybe you are looking for

  • EXPORT using OEM10g

    Hi All, I am trying to export(Instead of running a daily backup using RMAN, I want to schedule a daily export) a Oracle 11gR2 non-ASM database to ASM file system that we have on the server. Basically I want to use ASM file system as the backup direct

  • Getting ORA-22922 with apex_collection.create_collection_from_query

    Hi, i'm getting ora-22922 nonexistent LOB value with apex_collection.create_collection_from_query('coll_name','select a,b,c from testtable','NO'); what is going wrong? please help !! thx in advance !!!

  • Best way to set up a phone interview?

    Hi, I'm looking to set up a phone interview for my podcast. Does anyone have suggestions for how I might get the audio into Garageband? I'm working with a Macmini and a headphone with a mic. But I don't know I can get clear sound from my phone to GB.

  • I have just bought VAIO Fit 11A and it come up with a bundled PSE12. is it trial or full version?

    I have just bought VAIO Fit 11A and it come up with pre-loaded PSE12. In the first time I ran it, PSE request the Abode ID so I created the Adobe ID. Then, it run and work properly but today it show the notice that the software is trial version and c

  • Reading the expressions of assignments nested inside an If activity

    I have an If activity, with assignment activities in each of the Then and Else activities.  I need to read the expressions being used.  I can use WorkflowInspectionServices to get the activities, but how can I tell one from the other?   What Im doing