cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted Search and Item Events

Former Member
0 Kudos

Hi,

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

Paul

Accepted Solutions (0)

Answers (2)

Answers (2)

barend_morkel2
Active Contributor
0 Kudos

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!

Former Member
0 Kudos

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

www.corponet.com.mx

SAP Developer & Consultant

alperal (at) gmail.com

+52-(81)-137-937-80

Former Member
0 Kudos

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,

Paul