Skip to Content
avatar image
Former Member

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

Hello,

Is it possible to create a project using DI API?

C# code example if possible.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 27, 2016 at 01:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded