Form Auto Save event catch

Hello:
    I have addon that catch event at the time someone add or update a transaction and check coupel of things...etc. However as I found that if you use the X on the right upper column of the form to close the form. Form will ask you if you want to save, if you choose yes, it will by pass my event catch! I tried to use event log to identify the event handling, however the only thing I can see is a messagebox pop up. It doesn't allow me to stop it or anything. What can I do?
sincerely Yours

Bo,
I would think that you would want to catch the et_FORM_DEACTIVATE event.  This is the event that occurs when your active form is closed.  If you download the EventLogger tool from SDN for Business One that may assist you.  You can find it here ...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
You can also look at the sample code that comes with the SDK for catching events at ...
..Program FilesSAPSAP Business One SDKSamplesCOM UIVB.NET 2.CatchingEvents
HTH,
Eddy

Similar Messages

  • [OIM] Error in Direct Provisioning (with auto save form) - GTC DB App Table

    Hi,
    I am getting an error when setting up direct provision of a GTC DB App Conn using OIM access policy (and group membership) or through manual provisioning with prepopulate and auto save form.
    Manual provisioning with prepopulate ONLY (not with auto save form) WORKS!!!
    Some information about my OIM config:
    - Prepopulate adapters are set up on both forms (parent and child)
    - "Auto prepopulate" and "Auto save form" are set up at Process Definition
    - For direct provisioning, I have created an access policy with an associated group which has a membership rule
    What it is working:
    - Provisioning manually, using prepopulate adapters only, not auto save form. Both tables are updated properly
    - All *3 tasks are called and finished with status=Completed*: "System Validation", "Create User" and "Child Table UD_<connector child table name>_US row Inserted"
    Testing direct provisioning:
    - I have tested adding the resource manually with prepopulate and autosave form configured, and also through access policy/group membership. The error is the same on both tests
    - The resource is displayed as provisioned and it is created an entry in the parent table of the resource, but not on child table
    - I also observed that only: "System Validation" and "Create User" tasks were executed (status=Completed). But it is missing the task "Child Table UD_<connector child table name>_US row Inserted"
    - The error log info displays only an error regarding to UGP table (Groups info) but I am not sure if that is the cause of entry creation on child table.
    It seems the SQL stmt tries to get ugp_name (group name) using ugp_key but that has null value.
    "SELECT ugp_name FROM ugp WHERE ugp_key=java.sql.SQLSyntaxErrorException: ORA-00936: missing expression"
    Note: When testing manually (without auto save form), I got "SELECT ugp_name FROM ugp WHERE ugp_key=1" which it is the same SQL stmt but the value is provided.
    My guess:
    - It seems that error is aborting the whole execution process so "Child Table UD_<connector child table name>_US row Inserted" task does not run, even though previous tasks are finished with the status=Completed. Consequently, the entry is not created on child table.
    Please, any guess or help would be very helpful. In case nothing works, I guess I will have to create and customize a "Update child Form" task as an workaround which would be called after "Create User" task.
    Regards,
    Hugo
    My environment:
    - Windows 2003, WebLogic 10.3.0.0, OIM 9.1.0.2 BL4, Oracle 10g, Java 1.6, DB App Table Connector 9.1.0.2 (from October 2009)
    - Target Resource: Parent and Child Table (Oracle 10g - the same OIM DB)

    An update:
    I solved that error about "ORA-00936: missing expression" applying OIM 9.1.0.2 BP05. That was not impacting my issue regarding direct provisioning with auto save form and child form.
    So please if anyone can confirm:
    - Can I set up prepopulate adapters on child forms AND also use "auto save form" on GTC DB App Table connector?
    If not, any suggestion?
    Regards
    Hugo

  • How to Auto Save in iteractive forms

    Hi All,
    I am working on an interactive forms development in SAP.
    The requirement is to have a auto save functionality as in MS office documents.
    Also can we have book marks for the documents.
    Your help is much appreciated.
    Regards,
    Sai

    Hi All,
    I am working on an interactive forms development in SAP.
    The requirement is to have a auto save functionality as in MS office documents.
    Also can we have book marks for the documents.
    Your help is much appreciated.
    Regards,
    Sai

  • Popup window not populated on SAVE event

    Hi All,
    I am enhancing standard AIC_INCIDENT_H component on EH_ONSAVE event, requirement is  to display ComponentUsage "CUGSSurvey"
    , InterfaceView "SurveyWindow as Popup window , but there is a blank popup appeared
    On SAVE event i write the following code:
       IF gr_proctype_popup IS NOT BOUND.
        gr_proctype_popup = comp_controller->window_manager->create_popup(
                            iv_interface_view_name = 'SurveyWindow'
                            iv_usage_name          = 'CUGSSurvey'
                            iv_title               = 'Survey' ).
        ENDIF.
    lv_viewname2 = 'CUGSSurvey.SurveyOverviewWindow'.
    lr_viewset ?= me->get_subcontroller_by_viewname( lv_viewname2 )..
    lr_view_ctrl_par ?= lr_viewset->M_PARENT. ".
    current_sur_id = lr_view_ctrl_par->TYPED_CONTEXT->SURVEYID->collection_wrapper->get_current( ).
    current_sur_ver = lr_view_ctrl_par->TYPED_CONTEXT->SURVEYVERSION->collection_wrapper->get_current( ).
    * while current_sur_id is not initial.
          if current_sur_id is not bound.
            return.
          endif.
             try.
    *        data: rv_result type string.
            CALL METHOD current_sur_id->GET_PROPERTY_AS_STRING
              EXPORTING
                IV_ATTR_NAME = 'SURVEY_ID'
              RECEIVING
                RV_RESULT    = RV_RESULT
            catch cx_crm_cic_parameter_error.
          endtry.
          RV_RESULT = 'FDB_FORM_01'.
               TRY.
                CALL METHOD current_sur_id->SET_PROPERTY_AS_STRING
                  EXPORTING
                    IV_ATTR_NAME = 'SURVEY_ID'
                    IV_VALUE     = RV_RESULT
    *          data: lr_core TYPE REF TO cl_crm_bol_core.
    *          lr_core ?= cl_crm_bol_core=>get_instance( ).
    *          lr_core->modify( ).
    *            exit.
                 CATCH CX_SY_CONVERSION_ERROR .
              ENDTRY.
            if current_sur_id is not bound.
            return.
          endif.
             try.
    *        data: rv_result type string.
            CALL METHOD current_sur_ver->GET_PROPERTY_AS_STRING
              EXPORTING
                IV_ATTR_NAME = 'SURVEYVERSION'
              RECEIVING
                RV_RESULT    = RV_RESULT2
            catch cx_crm_cic_parameter_error.
          endtry.
          RV_RESULT2 = '0000000000'.
               TRY.
                CALL METHOD current_sur_ver->SET_PROPERTY_AS_STRING
                  EXPORTING
                    IV_ATTR_NAME = 'SURVEYVERSION'
                    IV_VALUE     = RV_RESULT2
    *          data: lr_core TYPE REF TO cl_crm_bol_core.
    *          lr_core ?= cl_crm_bol_core=>get_instance( ).
    *          lr_core->modify( ).
    *            exit.
                 CATCH CX_SY_CONVERSION_ERROR .
              ENDTRY.
      gr_proctype_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
      gr_proctype_popup->open( ).
    but on save event this screen appeared:
    I want this view with survey form, filled by user and then SAVE the incident.

    Hi Mohammed,
    Try setting the enabled property to false for ROOTUIELEMENTCONTAINER in that view. It should work out for you.
    Regards,
    Uday

  • FCPX undo / auto save bugs + RAM Hog - Possible Fix?

    Hi there FCPX users,
    I have a 8-core 2010 Mac Pro with 16GB Ram and the stock GPU running Lion 10.7.2
    I have been using FCPX since day dot, and have been overall very pleased with its super fast work flow and realtime capabilities.
    I have completed over 100 3-4min edits with average project size of 50GB, and a bunch of wedding edits with approx 150-200GB project sizes. The issues I had with 10.0.0 - 10.0.1  were mainly FCPX quitting unexpectedly.
    And now on 10.0.2 I have expereinced the well known auto save / greyed out undo bug. I have gone through all the steps via apple care which included:
    Trashing the Prefs, repair permissions, check drive space / correct format, new user account and clean install of lion / Final Cut X.
    I am still experiencing this issue. So yesterday I purchased another 16GB Ram totaling now to 32GB Ram, and I monitor the RAM usage via "Free Memory".
    I Noticed that if my RAM is running low, I "free Memory" without quitting FCPX and continue to work as normal, and so far I have not yet experienced the issue again.
    Dont know if this is a temporary fix, but it has worked for an hour long edit (approx 6-7 hrs without restaeting FCPX).
    Also, I have noticed FCPX will eat up 16-20GB RAM quite easliy.
    Not sure if this problem is related to RAM...
    My 2 cents.

    You have to really be conscious when you start a new project and how and where you manage your footage.
    No one has complained more than I have about FCPX's quirky behaviors and it can be frustrating. I have worked with FCPX since day one, even tried to get a refund but couldn't. After using it for a while now, it is very easy to get used to how fast some elements are in editing and reviewing a lot a footage. But several things you have to make sure of that will keep the rendering speed up and less crashing happening.
    First make sure that you can see how much space you have on your drives by right clicking in the main window of you screen and make the necessary clicks form the drop down menu. Make sure any drives you have been doing projects with lately are hooked up and do a secure empty trash. Its cool to see how much space you regain. 2) make sure that FCPX, Motion and Compressor (if you have those are installed on your boot drive).
    3) Create a FCPX Projects folder on an external (FW800) with at least 75% of its drive space available if you do not have secondary drive installed in your computer. (Its very important to note that any drive you use for any aspect of editing should never be more 75% full, especially your boot drive.) This is where FCPX will log all of its operating files for all of your projects.
    4) Either copy  all of the other FCPX files from your main hard drive and paste then into the new folder you created. Then delete all of those files, as well as any Motion files too! (Do the same as you did for FCPX in the previous step)
    5) If you need to move all of your music files to another drive as well. If its iTunes, you will have to tell iTunes where to look for the new files and it will populate accordingly. This will free up a tremendous amount of space. Make sure to delete them form the main drive.
    6) Remove any junk programs form the boot drive (main) or move them to another drive if possible.
    7) Now do another secure empty trash and watch your drive space return.
    8) Now open up FCPX and make sure you only create projects on your new drive by clicking on that drive in the project window. Any older projects you can simply pull them to the other drive and you will be prompted on how to duplicate that project and all its files to that drive. Delete the other ones.
    9) Only capture footage to you external drives. Save it there until you need it.
    10) Create all new projects on the secondary drive and pull any footage you are working with on that drive as well. By keeping it all off the Boot drive FCPX will run much smoother and faster, especially if you have at least 16g of Ram, which I recommend.
    So to re-cap:
    1. Keep your boot drive lean. Delete anything you can move to another drive. Do not set up events and or projects to it...never!!!
    2 Use you secondary drive for your project files and the video you are working with in your events.
    3. Store raw footage on a FW800 drive ready to move to your secondary drive.
    4. Use secure empty trash after all editing sessions when you are certain of your trash contents.
    Doing these things have greatly increased much more consistently faster render times and much fewer crashes.
    iMac 27  -  3.5gh  - 16GB Ram  -  Quad i7  -  250SSD/1TBesata  -  External FW800 Drives
    Good Luck

  • 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

  • LC8: Auto Save question

    Is there a way to have a form created in LC8 auto save so that it is not lost in the event of a computer crash or power failure?
    Please copy replies to [email protected]

    Yeah, I have had numerous crashes using LC8 and have lost hours worth of work.
    It's hard to understand that Adobe has not fixed this problem and added an auto-save feature.

  • I have a site I do business with. They do not authorize passwords unless a dealer. I do no have on an auto save function, as I want to type my passwords in ea

    I have a site I do business with. They do not authorize passwords unless you are a dealer. I do not have passwords on an auto save function, as I want to type my passwords in each time for security. My password for this site will only work a short WHILE, AND THEN it will not be recognized by the site and I cannot get in.
    Then I must contact the company to reset or clear it manually on their end so it can be reset. They always give me the SAME SETUP PASSWORD to use. I use it, then I RESET PASSWORD on my end. The computer seems to remember my user NAME AT least on my computer as it comes up once I start typing the username in. They SAY IT is a settings issue on my end. I do not have this problem on any other site even THOSE WITH higher SECURITY. I need to FIX the issue OR may LOSE ACCESS To the site as is very aggravating for them and they say other have had the problem but usually with chrome but never constantly.I am not that computer literate ,but my husband is an IT Security professor and textbook writer but says doesn't really know Firefox. I do not really want to store passwords on computer as have been hacked several times. He and I do not understand some of the terms mentioned. since it is not a problem with other sites it should be fixable. Please me help using terms I or my husband can understand without having to give Firefox all my passwords. I would be happy to set up something different just for this one site if I need to but need easy instructions. Have cleared the cookies before but it still happens. What setting do I need to change or set to fix this? the other questions that come up seem very different and do not apply. FF 22 now but happened w other FF versions.

    I'm having a little trouble understanding the part about your password having to be reset. Why is that happening??
    Let's start with Firefox's settings:
    (1) You can configure the password manager feature on this tab:
    orange Firefox button (or Tools menu) > Options > Security
    There is a checkbox to enable/disable the feature.
    There also is a "Saved Passwords" button to review and remove any passwords you do not want Firefox to keep.
    That tab also has a feature to set a Master Password so that no one can use your saved passwords without knowing the Master Password. You may need to exit Firefox in order for Firefox to ask for that again.
    Related articles:
    * [[Password manager - Remember, delete and change saved passwords in Firefox]]
    * [[Use a Master Password to protect stored logins and passwords]]
    (2) Site-specific permissions
    If you want to use the password manager for other sites but NOT a particular site, you can configure that in the Permissions Manager.
    In a new tab, type or paste '''about:permissions''' in the address bar and press Enter.
    After the page loads, use the search box in the upper left corner to narrow down the list to the site you want to configure. Highlight the site on the left side, and on the right side, choose Block under Store Passwords.
    (3) Form autocomplete suggestions
    Separate from passwords, Firefox remembers entries you've made into forms (in most cases) and lists the matching ones below the form field in a drop-down.
    To clear a suggestion, press the down arrow key to highlight it and press the Delete key.
    To turn off this feature, see this article: [[Control whether Firefox automatically fills in forms with your information]].
    To review and selectively edit or delete form history entries, you need an add-on. For example, you could try this one: https://addons.mozilla.org/firefox/addon/form-history-control/

  • Not able to get changed values in the SAVE EVENT in ServHPartnerDet view

    Hi Experts,
    I am new CRM WEB IC, i have requirement like need to access four IBASE fields from BupaIbaseDetail and need to display those fiedls in ServHPartnerDet view. I am able display the fields and its values in the target view. But when user press change button and changes those four fields and press save button not able get the changed values in to the SAVE EVENT.Anyone please help me in this.
    IBHEADER , IBASEADDRESS  are the CONTEXT NODE CREATED in target view. I have binded IBHEADER to CuCoIbase custom controller and getting four fields data from IBASEADDRESS. below is the code for CREATE_CONTEXT_NODES.
    METHOD create_ibaseaddress.
      DATA:
        model        TYPE REF TO if_bsp_model,
        coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        entity       TYPE REF TO cl_crm_bol_entity,              "#EC *
        entity_col   TYPE REF TO if_bol_entity_col.             "#EC *
      model = owner->create_model(
          class_name     = 'ZL_CRM_IC_SERVHPDET_CN00'
          model_id       = 'IBaseAddress' ).                    "#EC NOTEXT
      ibaseaddress ?= model.
      CLEAR model.
      coll_wrapper =
        ibheader->get_collection_wrapper( ).
    TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        TRY.
            entity_col = entity->get_related_entities(
                            iv_relation_name = 'FirstLevelComponent' ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
        TRY.
            entity ?= entity_col->get_current( ).
          CATCH cx_sy_move_cast_error.
        ENDTRY.
        CLEAR entity_col.
        IF entity IS BOUND.
          TRY.
              entity_col = entity->get_related_entities(
                              iv_relation_name = 'ComponentAddress' ).
              ibaseaddress->set_collection( entity_col ).
            CATCH cx_crm_genil_model_error.
          ENDTRY.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Code i have written in the CREATE_CONTEXT_NODE method for my custom context nodes( IBHEADER,IBASEADDRESS).
    this  CREATE_IBHEADER some data related to IBASE header then from this reading the IBASEADDRESS contextnode fields for displaying in the ServHPartnerDet. It is working fine but After changing the four fields values in the ServHPartnerDet view and trying to save, then context is not reading the new values it gives the old values only.
      TRY.
          lr_coll_wr = ztyped_context->ibaseaddress->get_collection_wrapper( ).
          IF lr_coll_wr IS BOUND.
            lr_entity ?= lr_coll_wr->get_current( ).
          ENDIF.
        CATCH cx_crm_genil_model_error.
      ENDTRY.
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
        EXPORTING
          iv_attr_name = 'BUILDING'
        IMPORTING
          ev_result    = lw_building.
    the building has got result of old value no the new value.
    method CREATE_IBHEADER.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_CRM_IC_SERVHPDET_CN01'
            model_id       = 'IBHEADER' ). "#EC NOTEXT
        IBHEADER ?= model.
        CLEAR model.
    bind to custom controller
      DATA:
          cuco TYPE REF TO cl_crm_ic_cucoibase_impl,
          cnode TYPE REF TO cl_bsp_wd_context_node.
      cuco ?= owner->get_custom_controller(
            'CuCoIbase' ).                                      "#EC NOTEXT
      cnode ?=
        cuco->typed_context->ibaseheader.
      coll_wrapper = cnode->get_collection_wrapper( ).
      ibheader->set_collection_wrapper( coll_wrapper ).
    endmethod.

  • How to auto save and pre-fill some textfields

    first time i open a pdf, there are some textfields. they are all empty.
    i click on a button to call a web service. this returns some text and fill in those textfields.
    if one of these textfields, "message", has got an auto-filled text "success", then the pdf needs to remember the text in some of the rest of the fields. next time when the user open it, those fields should be with the text generated last time.
    notice that the "Do you want to save the file" auto-popup window won't meet my requirement. even if the user clicks on "no" for this popup window, now that i get a "success" transaction from the web service, the fields should be saved.
    i read through this, but may not be able to use it. i only have LiveCycle Designer ES3. I don't know how those adminui or process work.
    http://livecycleapps.wordpress.com/2009/10/21/livecycle-es2-using-action-profiles-to-pre-f ill-a-form-for-display-in-workspace/

    Hi,
    in Designer ES3 there is an Auto Save option in the form properties you can activate.
    Remember, the form needs Usage Rights to be savable through Reader, so you need Acrobat to apply those rights to your form first.

  • 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

  • Would a 347 MB file be slow? Auto save and auto type turn off?

    I am doing an art inventory and add jpegs of the art. I don't resize them they range from 750k to 3MB. I guess if it is slowing the program down i should? It currently is 267 rows by about 18 columns.
    Thanks in advance.
    Oh can I turn off auto save and auto type? That may help. How do I do that?

    Done.
    Enter Scrip Editor
    paste the posted script
    File > Save > as Script  on the Desktop
    Move the script to the folder :
    Macintosh HD:Library:Scripts:Folder Action Scripts:
    CAUTION, you will be asked to enter your pasword.
    Create a folder to do the job. I named mine Normalized. I created mine on the Desktop where it's easy to reach.
    Go to :
    Macintosh HD:Library:Scripts:Folder Actions:
    Double click the alias :  Configure Folder Actions
    Below the left column, click
    navigate to select your new folder
    Below the right column, click
    select the script image - normalize400.scpt
    After that, drag and drop a picture file onto your folder.
    The original will be move in the folder Originals (isn’t it original ?)
    and a reduced copy  400 x height will be stored in the folder Normalized images.
    And now, here is the script :
    --{code}
    Image - Normalize
    This Folder Action handler is triggered whenever items are added to the attached folder.
    The script rotates the image counter-clockwise (left).
    Copyright © 2002–2007 Apple Inc.
    You may incorporate this Apple sample code into your program(s) without
    restriction.  This Apple sample code has been provided "AS IS" and the
    responsibility for its operation is yours.  You are not permitted to
    redistribute this Apple sample code as "Apple sample code" after having
    made changes.  If you're going to redistribute the code, we require
    that you make it clear that the code was descended from Apple sample
    code, but that you've made changes.
    modified by Yvan KOENIG (VALLAURIS, France)
    2011/12/08
    This version normalize pictures so that
    (1) the greater dimension become the width one (rotate left if needed)
    (2) this greater dimension is ruled by the property maxWidth defined below.
    property maxWidth : 400
    -- set it to fit your needs
    property done_foldername : "Normalized Images"
    property originals_foldername : "Original Images"
    property newimage_extension : "jpg"
    -- the list of file types which will be processed
    -- eg: {"PICT", "JPEG", "TIFF", "GIFf"}
    property type_list : {"TIFF", "GIFf", "PNGf", "PICT", "JPEG"}
    -- since file types are optional in Mac OS X,
    -- check the name extension if there is no file type
    -- NOTE: do not use periods (.) with the items in the name extensions list
    -- eg: {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}
    property extension_list : {"tif", "tiff", "gif", "png", "pict", "pct", "jpeg", "jpg"}
    on adding folder items to this_folder after receiving these_items
              tell application "Finder"
                        if not (exists folder done_foldername of this_folder) then
      make new folder at this_folder with properties {name:done_foldername}
                        end if
                        set the results_folder to (folder done_foldername of this_folder) as alias
                        if not (exists folder originals_foldername of this_folder) then
      make new folder at this_folder with properties {name:originals_foldername}
                                  set current view of container window of this_folder to list view
                        end if
                        set the originals_folder to folder originals_foldername of this_folder
              end tell
              try
                        repeat with i from 1 to number of items in these_items
                                  set this_item to item i of these_items
                                  set the item_info to the info for this_item
                                  if (alias of the item_info is false and the file type of the item_info is in the type_list) or (the name extension of the item_info is in the extension_list) then
                                            tell application "Finder"
      --set name of this_item to "YK#" & (text -4 thru -1 of ("0000" & i))
                                                      my resolve_conflicts(this_item, originals_folder, "")
                                                      set the new_name to my resolve_conflicts(this_item, results_folder, newimage_extension)
                                                      set the source_file to (move this_item to the originals_folder with replacing) as alias
                                            end tell
      process_item(source_file, new_name, results_folder)
                                  end if
                        end repeat
              on error error_message number error_number
                        if the error_number is not -128 then
                                  tell application "Finder"
      activate
      display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
                                  end tell
                        end if
              end try
    end adding folder items to
    on resolve_conflicts(this_item, target_folder, new_extension)
              tell application "Finder"
                        set the file_name to the name of this_item
                        set file_extension to the name extension of this_item
                        if the file_extension is "" then
                                  set the trimmed_name to the file_name
                        else
                                  set the trimmed_name to text 1 thru -((length of file_extension) + 2) of the file_name
                        end if
                        if the new_extension is "" then
                                  set target_name to file_name
                                  set target_extension to file_extension
                        else
                                  set target_extension to new_extension
                                  set target_name to (the trimmed_name & "." & target_extension) as string
                        end if
                        if (exists document file target_name of target_folder) then
                                  set the name_increment to 1
                                  repeat
                                            set the new_name to (the trimmed_name & "." & (name_increment as string) & "." & target_extension) as string
                                            if not (exists document file new_name of the target_folder) then
      -- rename to conflicting file
                                                      set the name of document file target_name of the target_folder to the new_name
                                                      exit repeat
                                            else
                                                      set the name_increment to the name_increment + 1
                                            end if
                                  end repeat
                        end if
              end tell
              return the target_name
    end resolve_conflicts
    -- this sub-routine processes files
    on process_item(source_file, new_name, results_folder)
      -- NOTE that the variable this_item is a file reference in alias format
      -- FILE PROCESSING STATEMENTS GOES HERE
              try
      -- the target path is the destination folder and the new file name
                        set the target_path to ((results_folder as string) & new_name) as string
                        with timeout of 900 seconds
                                  tell application "Image Events"
      launch -- always use with Folder Actions
                                            set this_image to open file (source_file as string)
                                            set {oldW, oldH} to dimensions of this_image
                                            if oldH > oldW then
                                                      set {oldW, oldH} to {oldH, oldW}
      rotate this_image to angle 270.0
                                            end if
                                            set |échelle| to maxWidth / oldW
                                            if |échelle| < 1 then scale this_image by factor |échelle|
      save this_image as JPEG in file target_path with icon
      close this_image
                                  end tell
                        end timeout
              on error error_message
                        tell application "Finder"
      activate
      display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
                        end tell
              end try
    end process_item
    --{code}
    Yvan KOENIG (VALLAURIS, France)  jeudi 8 décembre 2011 21:25:33
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Only two events catching

    Hi All!
    I'm an absolute beginner in making programs to SBO.
    I wrote any little trial program in VB6 (and Delphi5), but I have a problem the events handling (of course...).
    By the samples I use the code as below:
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
        If pVal.FormType <> 0 Then
            Select Case pVal.EventType
                Case et_ITEM_PRESSED:
                    SBO_Application.MessageBox ...
                Case et_KEY_DOWN:
                    SBO_Application.MessageBox ...
                Case et_GOT_FOCUS:
                    SBO_Application.MessageBox ...
                Case et_FORM_LOAD:
                    SBO_Application.MessageBox ...
                Case etc...           
            End Select
        End If
    End Sub
    Every time only two event catching: et_GOT_FOCUS and et_FORM_LOAD after the start, and not others.
    How can I get to catch the et_ITEM_PRESSED (there is a button on the form), etc. event?
    (Note1: This programs not registered as add-on.)
    (Note2: We have not yet SDK, the media is coming soon.)
    Best regards
    Gabor
    PS.: Sorry my terrible english!

    Gabor,
    the program needs to be registered with SBO, otherwise SBO cannot hand over the events (as far as I know). You probably just need to wait for your SDK ;(
    When you start, make sure that your first if- clause is
    If pVal.Before_Action = True
    otherwise you will get a lot of events twice (once before and once after event).
    Here is a quick sample of a handler I use.
    HTH Lutz Morrien
    Public Overrides Sub HANDLE_FORM_EVENTS(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean)
        Try
          If pVal.Before_Action = True Then
            Select Case pVal.EventType
              Case SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE
                'update display
                DisplayLabels()
            End Select
            'AFTER ACTION
          Else
            Select Case pVal.EventType
              Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                Select Case pVal.ItemUID
                  Case "btnPRINT"
                    PrintLabels(True, False)
                  Case "btnPRNTS"
                    SBO_Application.Desktop.State = SAPbouiCOM.BoFormStateEnum.fs_Minimized
                    PrintLabels(False, False)
                    SBO_Application.Desktop.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized
                  Case "btnEDIT"
                    EditMarkedLabel()
                  Case "btnDELETE"
                    DeleteMarkedLabel()
                  Case "chkALL"
                    SwitchMarkOnAllRows()
                  Case "btnPREVIEW"
                    SBO_Application.Desktop.State = SAPbouiCOM.BoFormStateEnum.fs_Minimized
                    PrintLabels(True, True)
                    SBO_Application.Desktop.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized
                End Select
            End Select
          End If
        Catch excE As Exception
          SBO_Application.MessageBox(excE.ToString)
        End Try
      End Sub

  • 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

  • Human Task worklist cannot auto save when submitting a Task Action

    Hi
    We are using SOA 10.1.3.1. In BPM worklist, if user doesn’t click the “save” button to save all the modified changes, all the modified records in the custom task form cannot store back to BPEL variables.
    1.Is there any ways to auto save all the modified info during the Task Action Submission (e.g. on choosing the APPROVAL outcome -> help user to auto save the records)?
    2.Or any ways to force user to click "Save" before clicking the "Approval" on Task Action?
    Any suggestion is highly appreciated.
    Thanks.

    Resolved by disabling pop-up blocking in IE8.

Maybe you are looking for

  • Problem with E52

    Hi.. I have this problem on my E52. Whenever i try to play music on it after sometime it stops and gives me a error message "General: System error"  I did the reinstallation of the software using the Ovi Suite but in vain. 

  • Enqueue replication service is not starting

    Hello Everyone,    We are running SAP Netweaver Portal NW7.2 SP6 on windows 2003 sp2 , microsoft cluster with two app servers.     We just did the upgrade from Nw 7.1 sp6 7.2 SP6  a month ago , and everything was ok : Then yesterday , I realised the

  • IMAP quickly downloads mostly of messages, but stalls at the last one

    An ongoing problem. When I download IMAP emails using latest version of Apple Mail, it quickly zips through most of them, but stalls for ages at the last one. e.g. if there are 30 emails, it zips through emails 1-29, but just sits there for the last

  • Camera function ? iphone 3G

    The camera worked fine for several pictures. The camera opens but any time I want to take the picture it shuts down. Sufficient memory available to save the pictures. Help welcome.

  • Welcome to Lenovo Design Studio!

     Lenovo's #DesignWithUs Challenge is your chance to design the next YOGA, showcase your creation to the world, and shape the future of Lenovo technology. From FEB 1-28, tell us about what the next-gen YOGA should be, then seize the day and design it!