Accessing BOReader from BPM?

Anyone accessed BOReader from a BPM? I know it can be done from form code, but I would like to be able to pre-filter the return results whenever a certain service namespace is accessed.

You sure can, but having direct access to the Db object for querying seems it makes BOReader redundant? What would BOReader do for you that you can’t do with the Db and a linq query?

I want to check if the service namespace is Erp.BO.ShipVia whenever it is called. Not sure what method I would build this off of though.
So we are going to have a ton of ship via codes since each one is completely unique to the box, the service, the carrier, and the ice type.
I want to, whenever the namespace is called, present a BPM data form that asks the user for a few options (the ones mentioned above). This data will go into the BPM and I will dynamically create the correct ship via code that I will place into the ship via field, wherever it is called.

I misunderstood I thought you wanted to Invoke BOReader form a BPM

BOReader just invokes GetList or GetRows for the given service. So you should be able to stick a BPM in that method assuming that BO Reader goes through the facade @Bart_Elia?

If it doesn’t (try it out), then you would have to add a filter to the ComboBox itself which is pretty easy.

Without customizing every form with a ship via field, do you think that what I’m saying is possible?
I’d really like to go with the BPM approach if possible.

Yes if GetList on the BOReader goes through Facade (which I am not sure) then putting a BPM on GetList inside the ShipVia Service would accomplish this… Give it a shot!

Will do, thanks for your help

@rbucek Just helped me verify BOReader on 10.1.400.X goes through the facade so any BPM on GetList inside ShipVia should trigger on BOReader.GetList :slight_smile:

Nice, so glad I can interface with experts to easily on this forum!

1 Like

Looks like ShipVia.GetList only triggers once per form, so subsequent attempts to get the BPM to fire on GetList fail to do anything. If the form is exited entirely, the method will be called again next time it’s opened, but only once.
Not sure if this solution will work the way I need it to :frowning:

That is correct once the dropdown has been populated it doesn’t feel like it needs to be populated again… makes sense… you may be better off doing your filtering in customizatin mode.

If you are looking to dynamically change the results of the dropdown then in the customization use code to change the filter property of the dropdown depending on whatever other conditions you have in your screen. You can’t do that universally. you could get BO reader to behave the way you want but it still requires customization on every screen anyways.

1 Like

For anyone who needs this;
In 10.0.700, it does NOT appear the BOReader goes through the facade.
In my case I needed to hide any Indirect codes that were marked as Inactive since that is not native in 10.0.
I had to use a customization with a filter to accomplish this.
The form does call the BOReader GetList but apparently, it’s not the same as Indirect.GetList since a BPM on that Method did not trigger any change.
However, if one uses the Indirect Search Indirect.GetList is called, and BPM’s do work there.

1 Like