cancel
Showing results for 
Search instead for 
Did you mean: 

DI API update report layout menu item name

tomas_homola
Explorer
0 Kudos
64

Hello,

Is it possible to update the name of menu item of report ?

I update the the name of report with
ReportLayoutsService.UpdatePrinterSettings
but it does not rename the menu item.

 

All I've found :

delete report layout and menu using
ReportLayoutsService.DeleteReportLayoutAndMenu
and recreate it again with
ReportLayoutsService.AddReportLayoutToMenu
But with this method i will loose additional settings (authorizations, ..)

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi tomas_homola ,

Can you please check the ReportLayout Object Members?

There is a member (property) named as 'Name' which sets or returns the Document's Name value.

Field name: DocName

Does it help?

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

tomas_homola
Explorer
0 Kudos

Hi,

I've tried

var service = (SAPbobsCOM.ReportLayoutsService)company.GetCompanyService().GetBusinessService(SAPbobsCOM.ServiceTypes.ReportLayoutsService);

var parameters = (SAPbobsCOM.ReportLayoutParams)service.GetDataInterface(SAPbobsCOM.ReportLayoutsServiceDataInterfaces.rlsdiReportLayoutParams);
parameters.LayoutCode = "RCRI0031";

var report = service.GetReportLayout(parameters);
report.Name = "Report 1 (Renamed from DI API)";

service.UpdatePrinterSettings(report);

 

But the menu item is not renamed.

tomas_homola_0-1738824633320.png

Tomas