cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with Business Objects

Former Member
0 Kudos

Ok, here is my problem... I am using SAP Business One 2005 DI API to connect and access business objects... I follow the help files in the ways of accessing the Business objects but my problem is that the only way to retrieve the data stored in the tables is by using a BoRecordset... If I use a business object type i.e.. BoObjectTypes.oProductionOrders all I get are the tables names returned... i.e.. OWOR, WOR1 but no data... Is this the way it is suppose to work or am I missing something??? If someone wouldn't mind, if you are able to access the data there the business objects, could you walk me through what you did so I can see where I went wrong??? Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey Jeremy,

Can you post the code you use to access the Business Objects? You can also use the Databrowser object to access the information directly from the Business object

Former Member
0 Kudos

<i>' Get the Production Order Business Object</i>

<b>bobData = vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)</b>

<i>'Get the XML fron the buisness Object</i>

<b>sString = bobData.GetAsXML()</b>

Then I display the string to see what I am working with... Maybe my problem is that GetAsXML only returns the top level and the accually data has to be retrieve through the data browser... I don't accually, know... Any ways that is the code I use to get the data object and display what I retrieved... I got this striaght from the SDK on how to do that... Should I be using the Data Browser?

Message was edited by: Jeremy Adam

Former Member
0 Kudos

Sorry, about this post, went to edit and instead reposted...

Message was edited by: Jeremy Adam

Former Member
0 Kudos

I am not sure about using the GetAsXML method in this manner. I always use the databrowser function anytime I am trying to access one of the business objects data.

Former Member
0 Kudos

Hmm, interesting... Well by using the Data Browser you really are only using the RecordSet object but filtered so you only access the data to that business object... Or at least that is how it looks from the Help files code samples... So really, the only point I see from accessing business objects is for data templating control... If I am wrong, please let me know but that is how it looks...

I suppose that I really don't have to use the business objects to access the data but I should use it to control the data, would most likely be wise to do so... Well I guess that solves it then... Thanks...:P