cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Addon installer for UDO?

Former Member
0 Kudos

Hi Experts,

I'm using SAP Business One v9 and SAP Business One Studio for development using VS2010.

I created UDO using SAP B1 Registration wizard and imported that UDO in SAP B1 Studio to do some customization in form design and to add some business logic in code-behind by adding a new UDOFormitem inside VS solution.

I want to install the customized UDO on the client's machine. Which is the best way to do that??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you guys for the quick response.

I have created the UDO Addon installer through DI API as you both mentioned above.

But the problem still in the form which is generated through SAP Business One Studio using VS 2010 not through screen painter.

I have modified the form by adding new tabs and buttons and some business logic.

The form has the extension of .b1f NOT .xml. The question is how to make an installer for the modified form to install it on the client machine??

edy_simon
Active Contributor
0 Kudos

Hi,

Provided that you have build the b1f and the b1f.cs,

On the menu event, you can call your form using :

                if (pVal.BeforeAction && pVal.MenuUID == "SBOAddonProject4.UDOForm1")

                {

                    UDOForm2 oUDO2 = new UDOForm2();

                }

Where UDOForm2 is the class name of the b1f.cs

Compile the above, and build the installer + ard as you would do with the previous SBO version.

The b1f file will be compiled together in the .exe. so you dont need to manually include the .b1f into the installer ( Unlike with the .srf)

When you click on the menu, it will open up your UDO form.

If you need to include it as the default form of your UDO,

when registering your UDO, you need to provide the oUDOMD.FormSRF property.

Regards

Edy

Former Member
0 Kudos

When i try to open a form like that (on the menu event), i get a System.Exception with following message: "System form should create by framework.". What am i doing wrong? (SAP B1 9.0)

Former Member
0 Kudos

I'm in the same situation, I can not create a new instance, the same mistake.


also,


how I can change the form settings edited in visual studio and load in sap since sdk

thanks.



Regards,

Jordi

Former Member
0 Kudos

Any Update on this issue? Making any relevant applications with Visual Studio seems to be impossible since there is no real examples of normal UDO operations and given solution does not work.

My form works when it's saved to SAP Database as a default form, but when I try to debug it with Visual Studio, it raises an error:

System.InvalidOperationException: System form should create by framework

Regards,

Joakim

Answers (3)

Answers (3)

Former Member
0 Kudos

You can look at the Samples in the C:\Program Files (x86)\SAP\SAP Business One SDK\Samples to give a first idea.

The SDK Help Center is also a good source for info and of course this forum.

If you run into problems drop us a line and we will try to help you.

Good luck.

Thanks&Regards

M.Syed

Former Member
0 Kudos

Hi Mohammad,

Take a look at this thread http://scn.sap.com/thread/1194935 and look at the answer from Former Member

Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD

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

        oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES

        oUserObjectMD.ChildTables.TableName = "LINES"

        oUserObjectMD.Code = "DATA"

        oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO

        oUserObjectMD.Name = "Data"

        oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData

        oUserObjectMD.TableName = "DATA"

        lRetCode = oUserObjectMD.Add()

        If lRetCode <> 0 Then

            oCompany.GetLastError(lRetCode, sErrMsg)

            MsgBox(sErrMsg)

        End If

        oUserObjectMD = Nothing

        GC.Collect()

BR,

VG

pvsbprasad
Active Contributor
0 Kudos

Hi,

UDO can be created 2 ways

1. Using Code

2.SAP Object regestration wizard

both will work

If u do it through code Addon can be stabilized.

Regards,

Prasad