Skip to Content

How to add DELETE functionality to an OWL autogenerated by Studio

I want to allow the delete of a record shown in an OWL that was generated by the Studio.

I don't see a EventHandler for the add, so I don't know how to reverse engineer that. I do have that gear box that does the add - so it doesn't seem to use an Eventhandler in the OWL.

Appreicate any tips to:

1. Add a delete button on the OWL or even a right mouse menu

2. When the delete button is selected on a row where the cursor is, it prompts a confirm, then delete if approved.

Thanks ahead.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2013 at 09:44 AM

    Hi Tim,

    Please follow the below step..

    1. create an Action file say Action-DeleteInstance.abls

    write the code

    import ABSL;

    this.Delete();

    2. Go to OWL and add a button

    3. Then Goto controler tab select DeleteHandlder under eventhandler

    Select operation BOOperation like in below image.

    This below step will select the currente selectd instance in OWL

    4. Then select Other operation Message Box, then configure like below image

    5. Now Select "DeleteAllHandler", as in above highlighted box

    6 select the operation BOAction, bind your absl action

    7. select operation List for refresh the DataList.

    I hope this will work for you... 😊

    Thanks

    Suni


    deleteTim.jpg (55.7 kB)
    deleteTim.jpg (137.6 kB)
    deleteTim.jpg (119.3 kB)
    deleteTim.jpg (132.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Jayash,

      To overcome your first problem, we have to skip 3rd step from Sunil's blog i.e Using of BOOperation as this is not required.

      After doing this it works very fine i.e. Delete button is active only when record is selected.

      Thanks & Regards

      Komal

  • Posted on Apr 05, 2014 at 07:23 PM

    Hi Tim,

    you are missing a setting, thats why it is greyed out.

    Please switch to the DataModel view and select the DataList node in the tree on the left.

    Properties tab on the right and change the Lock Behavior property from Automatic to EditOptimistic.

    This will make your button be working.

    Cheers,
    Jens

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2013 at 05:57 AM

    Hi Tim,

    About your question, blew is my suggestion.

    1. Add a delete button on the OWL or even a right mouse menu

    Chris: Add delete button on OWL is absolutely okay while right mouse menu is not feasible as far as i know.

    2. When the delete button is selected on a row where the cursor is, it prompts a confirm, then delete if approved.

    Chris: You can add one MessageBox in your eventhandler to ask user to confirm then delete.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Tim Chang

      Tim, all you have to do is add a new button, sub-button, or menu item using the toolbar config properties and then bind this button/menu item to a new event which calls the BOaction.

      As a FYI, Cloud for Customer has some strict guidelines on how you layout these buttons/menus so they work on iPad, since the iPad expects a specific order and layout for menus and buttons.

      An easy way to know if your UX is compliant with the iPad is to open an existing OWL or standard thing inspector floorplan like the Account and you can see what needs to be done.

      Some guidelines are:

      1. Only 1 header button on the thing inspector can be rendered on the iPad. So if you need more buttons, you should create a header menu and then put menu items that represent all of the buttons. If you want those buttons on the header on the desktop, you can use ruby script to hide/show content that is not supported on the iPad since iPad cant render Ruby script. Since iPad cant render Ruby script any UI content that is attached to it, will automatically be hidden on the iPad.

      2. An OWL (work center or a facet in a thing inspector) must have a "New" link first and then a Menu (like the gear wheel you are talking about) with all of the list actions in the menu

      3. An OWL must use the List Modification Pane UX control to add rows to the OWL.

  • Posted on Dec 06, 2013 at 10:56 PM

    Thanks all for the great tips. I continued with method from Thomas Schneider's book - details in my earlier post.

    However, the Delete button is greyed out. How I got here - I also added a "Add Row" and put in the EventHandler. Then I change my mind and deleted that from the Toolbar Config. And called it a night.

    Today in my testing, I noticed the Delete button is always greyed out. It was working last night...

    Has anyone seen this ?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.