Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Wanted to create a Dynamic GP Company from C# Code

Posted on by 60

Hi,

I can create dynamic GP company from GP Utilities. But I wanted to create GP company using C# Code, Is there any way to do this.

Thanks

Categories:
  • Suggested answer
    RE: Wanted to create a Dynamic GP Company from C# Code

    Looking at the script, we're actually passing the following:

    The supplied parameters and their values are provided to the Add-CompanyDatabase cmdlet:

    -GPClientDirectory “C:\Program Files (x86)\Microsoft Dynamics\GP2016”

    -SqlAdmin “sa”

    -SqlAdminPassword “password”

    -SqlServerName “2016R1-SQL\GP”

    -CompanyName “azurecurve Publishing”

    -CompanyDbName “A16R1”

    -SqlMdfFilePath “C:\SQLServer\Data\”

    -SqlMdfFileName “GPSA16R1Dat.mdf”

    -SqlLdfFilePath “C:\SQLServer\Data\”

    -SqlLdfFileName “GPSA16R1Dat.ldf”

    When creating a new company database, after logging into GP Utilities, we're just entering the Company ID and name, then the names and paths for the MDF and LDF files, that's about it. All of that information is being passed here.

    What it won't do is any of the options to load shipping methods, default chart of accounts or copy access from another company, as I don't see those variables mentioned at all.

    I found more information in the following PDF file:

    download.microsoft.com/.../GPPowerShell.pdf

    Thanks

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: Wanted to create a Dynamic GP Company from C# Code

    Interesting response Derek. How do you handle the series of prompts that are presented by GP Utilities as you create a company?

  • Suggested answer
    RE: Wanted to create a Dynamic GP Company from C# Code

    I wanted to add to the PowerShell option, as referenced in this blog:

    www.azurecurve.co.uk/.../

    I know it isn't the C# that you mentioned, but maybe another option if you're looking to mass-create company databases, such as we've seen hosting partners do.

    Thanks

  • Suggested answer
    RE: Wanted to create a Dynamic GP Company from C# Code

    I think I've seen someone do this in order to mass create company databases for Dynamics GP, but I want to say it was more PowerShell than C#. Either case we don't have any sample code to create a company database for Dynamics GP and would only support through GP Utilities.

    There may be someone on the forums here that has done this and will have some information.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: Wanted to create a Dynamic GP Company from C# Code

    Why?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans