Over the last several months we have highlighted various aspects of the Service Based Architecture and steps you would complete when creating or using new operations. With this post we’d like to wrap things up and give you an all up checklist of steps you need to do when creating your own operations.

Design

                What operation endpoints are needed to enable the scenario you are going after?

                Would a wrapped window or decoupled approach be the most efficient method?

(Thanks to MVP, Mariano Gomez for the great summary post on these patterns!)

Create supporting .NET Objects

                With the assistance of the Service Code Generator, create a .NET assembly that will contain the object and property definitions being used in your operations.

 

Creating a reference in the Dexterity Dictionary

                Once you’ve created your .NET Object addin, you’ll need to add a reference to it via the Libraries window in your Dexterity dictionary. More information on how to do this can be found in the Dex.chm documentation file under Scripting > .NET Interop > .NET Assemblies.

 

Create the Service Operations in the Dictionary

                Create new procedures

Add new metadata following the naming convention guidelines

                Add in proper error handling

                Ensure metadata is setup for how you wish the operation to be secured within GP

Note: The Service Code Generator can help in these steps as well

 

Execute DAG on the dictionary

                Once you have all of your service procedures defined, the next step will be to run the DAG tool on the dictionary. This wraps up the metadata supplied and includes the operation information in Discovery. If you are not familiar with the DAG tool, please see Chapter 6 of the Visual Studio Tools SDK documentation.

 

Copy Assembly to the Client Directory

       Three assembly files are created and they need to be copied into your Dynamics GP client directory:

                Application.<dictionaryname>.dll

                Application.<dictionaryname>.Metadata.dll

                Application.<dictionaryname>.Metadata.xml

 

Stop and Restart the SBA Services

                Restart the three associated services with your Service Based Operation installation:

                GP Dexterity Service – DEFAULT (or your named instance)

                GP Dexterity Service Control

                GP Service

 

Verify Discovery information available for new operations via Help Command

                At this point your new operations should be available as an endpoint via the service. A quick way to check the information is to use the Help service call to look at the Discovery information available for your operation. Is it included and the corresponding information correct? If so, then you are ready to try a call using your new endpoint!

 

That concludes the checklist of steps you need to do to create a new service endpoint. At this point, other helpful steps would include creating tests around your operations. If things start to go sideways, you’ll then want to review the debugging tools available to you.

 

I’ve also included some additional links to posts around SBA for those who are delving deeper into unique scenarios that may require some specific control, extensibility, authentication, or working with CORS.

Raw requests and responses

Service Context

Extensibility

Authentication (and authentication from Java Script)

CORS - Cross Origin Resource Sharing