web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Service Based Architecture and Custom Procedures

(0) ShareShare
ReportReport
Posted on by

Can anyone tell me the steps for creating and the URL for calling a custom procedure with the new SBA for GP 2015?

Here is what I've done to this point:

  1. Created a procedure with an out parameter that sets the parameter to the static string, "Hello World!"
  2. Edited the properties of the procedure with the following values:
    • ServiceAction: Get
    • ServiceCustomAction: I did not specify a value.
    • ServiceEnabled: TRUE
    • ServiceRawRequest: FALSE
    • ServiceUriTemplate: HelloWorld
  3. Created a chunk file with that change and installed it on my default (and only) instance.
  4. I saw a post (here) saying that the Dictionary Assembly Generator (DAG) was necessary to get the SBA running, so I created an assembly for my application and placed it (and the metadata files, although I don't know if that is necessary) in the AddIns folder of GP (is that the right place?).

At this point I tested it with no luck, so I restarted all of the services thinking that might be necessary to get it to pick up the new code, but got the same result:

{
  "Status": {
    "CorrelationId": "2303d30bb45a4d348139ac55807a7e8f",
    "HttpCode": 404,
    "ErrorCode": "OperationNotFound",
    "Source": "DexterityProcess",
    "Message": "No operation was defined for this URI\/verb combination."
  }
}

The relevant request log from didn't reveal much more:

11:09:33.940 | CorrelationId:       [2303d30bb45a4d348139ac55807a7e8f]
11:09:33.940 | ProxyId:             [f1a044bbdd9f4885bebe9dbfa0d94785]
11:09:33.940 | OperationNumber:     [7]
11:09:33.940 | RuntimeDir:          [C:\Dynamics\GP2015]
11:09:33.940 | HTTPVerb:            [GET]
11:09:33.940 | Full URI:            [https://mymachine:myport/GPService/Tenants(Test)/Companies(Fabrikam, Inc.)/Artis Dexterity Programs/HelloWorld.json]
11:09:33.940 | Operation URI:       [/Artis%20Dexterity%20Programs/HelloWorld]
11:09:33.940 | CustomAction:        []
11:09:33.940 | Tenant:              [Test]
11:09:33.940 | Company:             [Fabrikam, Inc.]
11:09:33.940 | SetFile:             [C:\Dynamics\GP2015\Dynamics.set]
11:09:33.940 | IniFile:             [C:\Dynamics\GP2015\Data\Dex.ini]
11:09:33.940 | AuthType:            [NTLM]
11:09:33.940 | RequestUser:         [ARTISINC\phaag]
11:09:33.941 | ProcessUser:         [ARTISINC\paulgp2015services]
11:09:33.941 | ProcessId:           [6712]
11:09:33.941 | OperationTimeout:    [00:00:00]
11:09:33.941 | ForceBackground:     [False]
11:09:33.941 | ResponseFormat:      [Json]
11:09:33.941 | Service executable:  [1.0.91.0]
11:09:33.941 | DynamicsRuntime.dll: [14.00.0072.000]
11:09:34.001 | [*Error*]::Request Exception (bridge - expected) :: CorrelationId:[2303d30bb45a4d348139ac55807a7e8f], HttpCode:[404], ErrorType:[OperationNotFound], Source:[DexterityProcess], ExInfo:[Microsoft.Dynamics.GP.Svc.Foundation.ErrorHandling.RequestException: No operation was defined for this URI/verb combination.
   at Microsoft.Dynamics.GP.Svc.DexterityProcess.OperationManagement.OperationManager.FetchOperation(String uriPart, String httpVerb, String customAction)
   at Microsoft.Dynamics.GP.Svc.DexterityProcess.DexterityProcessBridge.ExecuteForegroundInstructionsInternal(DexterityServiceRequestData requestData)]
11:09:34.058 | --------- WEB SERVICE CALL IS RETURNING ----------

As you can see from the trace, I was trying a URL in the format: https://mymachine:myport/GPService/Tenants(MyTenant)/Companies(Fabrikam,%20Inc.)/MyProductName/MyServiceUriTemplate.json. I have also tried replacing MyProductName with MyProductId, but I get the same result. I'm assuming I'm missing something more fundamental about the structure (like a sub-directory by product).

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rob Bernhardt Profile Picture
    on at

    Paul,

    You need to place the new Application.PRODUCTNAME.dll in your GP runtime folder.  After restarting your services, a good way to see if your endpoint is available is by using discovery (url below).  That will show all the dictionaries that have been DAG'ed and have available service endpoints.

    https://<MachineName>/GPService/Tenants(DefaultTenant)/Companies(Company Name)/Help/

    Thanks

    Rob

  • Community Member Profile Picture
    on at

    Oh, right. Makes sense that would go in the runtime folder instead of the addins folder. Also, good tip on the Help URL. That's tremendously useful.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans