cancel
Showing results for 
Search instead for 
Did you mean: 

.DLL file for UDO in C#

Former Member
0 Kudos

Hi all,

I am trying to create a .dll file for the <b>UDO</b> using C#. SAP Business One SDK UDO samples provides a .dll file that was created in CPP. This .dll file makes use of some header & library files. How do I create this .dll file in C# & use the functionality of those header & library files ?

Accepted Solutions (1)

Accepted Solutions (1)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

The dll for UDO can only be developped by using C++.

You have all information regarding how to develop this dll in the UDOs section of the Help Center. There is a action inside UDOs called "Extending the Business Logic", all information is in there.

Hope it helps

Trinidad.

Former Member
0 Kudos

Hi Trinidad,

If I want to manually add a record into my UDO linked database table & would also like SAP B1 to manage the series automatically ..then how do I go about it ?

Praveen.

former_member184566
Active Contributor
0 Kudos

Hi Praveen G

When you create your UDO you can then stipulate that you want a series for it. Here is an example code of adding a UDO through code and linking a header and lines table

Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD

Dim oUserTable As SAPbobsCOM.UserTable

Dim Rs As SAPbobsCOM.Recordset

oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)

oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.ChildTables.TableName = "Table2"

oUserObjectMD.Code = "ObjectCode"

oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.Name = "Give A name" oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document

oUserObjectMD.TableName = "table1"

lRetCode = oUserObjectMD.Add()

You'll see that i have

oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES

this indiccates to manage the series

Then when load the form you must let it know what to browse by

oForm.DataBrowser.BrowseBy = "DealNo"

Hope this helps

Answers (0)