Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GpWebServices Header - Lines Custom Service

(0) ShareShare
ReportReport
Posted on by 216

Hi,

I am trying to Create a Custom GP WebService similar to SalerOder inside Dynamics GP. I have created the Document Type for my Service and have also created the Create Operation inside the Contract. Below is my Document Type Class for my Custom Service :

public class DynADCampaignOrder:BusinessObject

    {

        #region Data members

       

        private string guiid;

        private string orderdocumentId;

        private string customernumber;

        private string billtonumber;

        private List<DynADCampaignLines> lines;

        private DateTime orderfromdate;

       //more properties

     }

public class DynADCampaignLines

    {

        #region Data members

 

        private string guiid;

        private string seqguiid;

        private string orderdocumentid;

        private string ordernumber;

        private int sequencenumber;

        private int orderlinecreateflag;

        private string customernumber;

       //more properties

     }

The web service we are building is similar to sales orders inside GP, i.e. it has a header and multiple lines. When we run a test, we pass an object to the web service with a header and an array of lines. The service is reading the header data successfully but not the lines - it cannot see any data in the lines itself. We are able to get an array of data from the client inside the web service. It seems like the XSLT is not mapping the fields from the code to the stored procedure.

I tried mapping in the XSLT the following way but I am  still unable to access the data. Note the GUID way and the SEQGUID way are different – we tried using DynADCampaignOrder/DynADCampaignLines/Guiid and also DynADCampaignLines/Guiid but could still not get to the data.

<GUIID>
<xsl:value-of select="DynADCampaignOrder/DynADCampaignLines/Guiid"/>
</GUIID>
<SEQGUIID>
<xsl:value-of select="DynADCampaignLines/SeqGuiid"/>
</SEQGUIID>

Note the way in the SDK Lead sample to specify the class name/property name is working fine on the header.

Can anyone tell me how to access the line array data in the XSLT? Is there possibly something else I am doing incorrectly with my approach as well? 

*This post is locked for comments

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans