cancel
Showing results for 
Search instead for 
Did you mean: 

How show UDO menu item?

g_catena
Explorer
0 Kudos

Hi,

I created UDO with all menu's properties valorized by sdk, but when I run the project the menu item doesn't show. To show it I need to re-choose the company, do someone know how show it immediatly?

Thank you

Gianni

Here my code:

var oUserObjectMD = (UserObjectsMD)Globals.GlobalCompany.GetBusinessObject(BoObjectTypes.oUserObjectsMD);

oUserObjectMD.ObjectType = BoUDOObjType.boud_MasterData;
oUserObjectMD.CanFind = BoYesNoEnum.tYES;
oUserObjectMD.Code = "TestCode";
oUserObjectMD.Name = "TestName";
oUserObjectMD.TableName = "TT_TableTest";

oUserObjectMD.CanCreateDefaultForm = BoYesNoEnum.tYES;
oUserObjectMD.EnableEnhancedForm = BoYesNoEnum.tYES;

oUserObjectMD.MenuCaption = "My UDO";
oUserObjectMD.FatherMenuID = 3328;
oUserObjectMD.Position = 1;
oUserObjectMD.MenuUID = "MyUDO";
oUserObjectMD.MenuItem = BoYesNoEnum.tYES;

oUserObjectMD.FormColumns.FormColumnAlias = "Code";
oUserObjectMD.FormColumns.FormColumnDescription = "Code";
oUserObjectMD.FormColumns.Add();

oUserObjectMD.FindColumns.ColumnAlias = "Code";
oUserObjectMD.FindColumns.ColumnDescription = "Color Code";
oUserObjectMD.FindColumns.Add();

var result = oUserObjectMD.Add() == 0;
former_member233854
Active Contributor
0 Kudos

What was the result value?

g_catena
Explorer
0 Kudos

The result is true, the UDO is well created and if I disconnect and connect the company or close and open SAP client I view the menu Item.

The issue is that I'd like to view the menu item immediately after adding the UDO.

So, I don't know if I miss something or I have to re-connect the company by code (how?)

Accepted Solutions (0)

Answers (0)