Skip to Content
0

How to create a project in SAP B1 using DI API?

Dec 26, 2016 at 12:32 PM

268

avatar image

Hello,

Is it possible to create a project using DI API?

C# code example if possible.

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Edy Simon Dec 27, 2016 at 01:26 AM
0

Hi Avichay,

Below quoted from DI API Help file:

Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim projectService As SAPbobsCOM.IProjectsService
Dim project As SAPbobsCOM.IProject

oCmpSrv = oCompany.GetCompanyService
projectService = oCmpSrv.GetBusinessService(SAPbobsCOM.ServiceTypes.ProjectsService)

project = projectService.GetDataInterface(SAPbobsCOM.ProjectsServiceDataInterfaces.psProject)

project.Code = "1"
project.Name = "Jeremy"
projectService.AddProject(project)

project.Code = "2"
project.Name = "June"
projectService.AddProject(project)

I believe it should be simple enough for you to convert it to C#.
Or you can use the code converter from the web.

Regards
Edy

Share
10 |10000 characters needed characters left characters exceeded