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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Message Queue In GP

(1) ShareShare
ReportReport
Posted on by

HI all,

I'm using Message Queue to send the data to GP.i'm getting XML data in Message Queue.but that customer data(when i try to insert the customer) is not syncing in GP.Please suggest me for this problem .

My code is below :

eConnectType eConnect = new eConnectType(); // Instantiate an eConnectType schema object
XmlSerializer serializer = new XmlSerializer(eConnect.GetType());// Create an XML serializer object
RMCustomerMasterType[] mySmCustomerMaster = { mySMCustomerMaster };
eConnect.RMCustomerMasterType = mySmCustomerMaster;// Populate the eConnectType object with the RMCustomerMasterType schema object
MemoryStream memoryStream = new MemoryStream();// Serialize the object to produce an XML document
serializer.Serialize(memoryStream, eConnect);
memoryStream.Position = 0;
XmlDocument createCustomerDocument = new XmlDocument();
createCustomerDocument.Load(memoryStream);

//Creating the customer entity
// customerResult = eConnectMethod.CreateEntity(sConnectionString, createCustomerDocument.OuterXml);

// HairDirect Customizations //

MessageQueue queue = new MessageQueue(@".\private$\econnect_incoming");
if (!MessageQueue.Exists(@".\private$\econnect_incoming"))
{
MessageQueue.Create(@".\private$\econnect_incoming");
}

Message message = new Message();
ActiveXMessageFormatter formatter = new ActiveXMessageFormatter();
MessageQueueTransaction transaction = new MessageQueueTransaction();
message.Label = "Customer Creation";
message.Body = createCustomerDocument.OuterXml;
message.Formatter = formatter;
queue.Send(message, "Customer XML Data", transaction);
formatter.Write(message, createCustomerDocument.OuterXml);
transaction.Begin();
transaction.Commit();
queue.Close();

 

Please tell me if i miss anything in this code.

*This post is locked for comments

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans