Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.