Skip to Content
author's profile photo Former Member
Former Member

Formatted Search and Item Events


I am having a huge problem with using Formatted Search and Add-Ons.

On the Sales Order Form I have a Formatted search Setup on the Customer Reference Number, it is set to Auto-Refresh when the CardCode changes. This is the only Formatted search on this form and it works fine.

However, when I run my Add-On, and enter an Item Code it takes about 30 seconds to display the Item Description. In tracing my Add-On it appears to call the Item Event et_GOT_FOCUS on the Item Code Column I just entered over 50 times. I don't use other events, but for testing I did turn on all events and the only other event it occured with was et_LOST_FOCUS.

If I turn off my Add-On or turn off Auto Refresh on the Formatted search everything runs as it should.

I figure the Auto Refresh of the Formatted search has something to do with this, but I need to have this turned on. Another thing is that it only seems to call this event when Before Action = false, It does not seem to be called on Before Action = True.

Can I disable the Formatted search temporarily from within my add-on or is there something else I need to do to keep this from happening.

Thanks for Any Help


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 04:10 AM

    Hi Paul,

    I had a similar problem like yours, but in my case the Formatted Search didn't execute in some cases, so I had to remove the Search, and program it myself within the Add-On.

    It's a bit different aproach, but now you're in control of the search and data fill.



    Alfredo Pérez

    SAP Developer & Consultant

    alperal (at)


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Alfredo,

      Thanks for the suggestion, that sounds like it might be what I am looking for. But I am confused on trying to visualize how this would work. Do I need to duplicate the entire logic that Business One already does or are there some functions in the DI/UI that I can call that does the functions. Since I am doing this from a System(Sales Order) not User Defined Form, does that change anything. I did see the FormattedSearches Object to add a Formatted Search through the DI, but that seems like it will just create the Object and not help me execute it from my Add On.

      Is there some code snipits you could provide or get me going in the right direction on how to implement the formatted searches from within my Add-On.

      Thanks Again,


  • Posted on Oct 19, 2006 at 07:48 AM

    Hi Paul,

    I agree with Alfredo.

    If you're adding functionality using an Add-On, you might as well add all the extra functionality using the Add-On.

    The advantage of this is that formatted services are not bulletproof - the user can still fidle with it and break it. Where as with the Add-On, if the logic is in there, it can't be messed with.

    Remember also to filter the events in your Add-On. This is very important!

    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.