Call BO from Customisation

Hi

I’m trying to customise a dashboard so that I can call Business Objects. I’ve got a deployed dashboard, with a new sheet added. I’ve hooked up a text box control on the new sheet, that updates with the JobNum from the grid.

Now, looking at the customisation guide and also Object Explorer I’m confused. At some point, I need to pass/or receive from a method the dataset I guess? Some of the methods that are called when tracing it out are things like GetNewJobAsmblMultiple. This one shows are returning a bool, which is fine if I want to know whether it completed OK but where do I get at the data?

Many Thanks
Mark

I think the wizard code was throwing me off track. That sets up, uses and then disposed of the adapter. If I go back into the wizard and add the next method call, I’ve got 2 instances of the adapter created and disposed of.

I’m thinking I need to place all of the method calls within one adapter session, so use the wizard as starting point then modify there.

The data is held within the adapter, is that correct??

Mark,

Here are some general thoughts, hopefully they apply and are useful.

First - if you intent to use a specific adapter multiple times, you are best to keep it alive and only destroy it on form destroy.
When you use the adapter wizard it should bring in the necessary imports. I cant remember if it actually initializes an adapter for you. I don’t think it does.

Basic usage is:
MyAdapterType adapterName = new MyAdapterType(oTrans);
adapterName.BOConnect();
// do everything needed
adapterName.Dispose();

Different methods have different reactions but ususally, if you call a method that creates, the data is created within the adapter. The name of the storage is different based on the adapter. Which adapter are you using?

Also, some methods that request data put them into the adapter, and others put them into a container (ususally dataset) that you provide. You can tell which ones use the internal adapter storage by looking at the return type of the method. A bool means its stored internally, a dataset of sometime says it external.

Modifying data is the same for either case BUT in order to update, data needs to be internal to the adapter so you have to get it there - there are different ways to do that as well.

Maybe some more details would help us to help you a little better.

@Chris_Conn thanks very much for the post - it pushed me to try a bit harder, and I’ve now managed to get some PartLots created, ReportQty and JobReceiptToInventory.

I will post finished code when I get there eventually.