Solved

Error Description = Customer Number does not exist when using eConnect to create a new Sales Order

Posted on 2011-03-03
29
1,687 Views
Last Modified: 2012-05-11
I can clearly see the customer number on both the line item and invoice header in the xml file that was created but it still gives me an error

Error Number = 598 Stored Procedure taSopLineIvcInsert Error Description = Customer Number does not exist

<CUSTNMBR>C5624</CUSTNMBR>

0
Comment
Question by:GaryRasmussen
  • 17
  • 5
  • 4
  • +1
29 Comments
 
LVL 18

Expert Comment

by:Victoria Yudin
ID: 35030404
I would read that message to mean that the customer does not exist in GP.  Have you confirmed that it does?
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35030557
Yes I have.  I looked up C6524 unside the GP customer card.  And I thought that too but before I got this far, I was getting similar errors like:

Error Number = XXX Stored Procedure taSopLineIvcInsert Error Description = Quantity does not exist
OR
Error Number = XXX Stored Procedure taSopLineIvcInsert Error Description = Price Level does not exist

And it was because the "element" did not exist in the XML.  As soon as I added those elements, those errors went away.  So I was assuminhg that this error meant that it cannot find the Customer Number element?
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35030564
BTW, <CUSTNMBR>C5624</CUSTNMBR> is not part odf the error message so I am sorry if that is misleading.  That line is from the XML that was generated
0
 
LVL 18

Expert Comment

by:Victoria Yudin
ID: 35030633
Gary,

Gotcha, sorry, I have not seen this before.  Perhaps you'll get someone else to respond that has.  
0
 
LVL 18

Expert Comment

by:Steve Endow
ID: 35031183
Hi Gary,

A few questions:

1) Which version of GP / eConnect are you using?  Have you installed the latest service pack?

2) Have you confirmed that you are importing your transaction into the correct company database that does contain the customer? (i.e. not accidentally importing to TWO)

3) Can you post your full SOP XML document that you are sending to eConnect?

Thanks,

Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35031236
Thank you so much for replying.  I am really stuck.

eConnect 10

I am only using a single global connection string and that string points to the database that I want.  I have no other code that points to any other database.  Here is my xml:

  <?xml version="1.0" encoding="utf-8" ?>
- <eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOPTransactionType>
  <eConnectProcessInfo xsi:nil="true" />
  <taRequesterTrxDisabler_Items xsi:nil="true" />
  <taUpdateCreateItemRcd xsi:nil="true" />
  <taUpdateCreateCustomerRcd xsi:nil="true" />
  <taCreateCustomerAddress_Items xsi:nil="true" />
  <taSopSerial_Items xsi:nil="true" />
  <taSopLotAuto_Items xsi:nil="true" />
- <taSopLineIvcInsert_Items>
- <taSopLineIvcInsert>
  <SOPTYPE>3</SOPTYPE>
  <SOPNUMBE>INV00000000000022</SOPNUMBE>
  <CUSTNMBR>C5624</CUSTNMBR>
  <DOCDATE>03-02-2011</DOCDATE>
  <ITEMNMBR>SMARTFILL</ITEMNMBR>
  <UNITPRCE>150.00</UNITPRCE>
  <XTNDPRCE>2250.00</XTNDPRCE>
  <QUANTITY>15</QUANTITY>
  <PRCLEVEL>DEFAULT</PRCLEVEL>
  <NONINVEN>1</NONINVEN>
  <UOFM>EACH</UOFM>
  </taSopLineIvcInsert>
- <taSopLineIvcInsert>
  <SOPTYPE>3</SOPTYPE>
  <SOPNUMBE>INV00000000000022</SOPNUMBE>
  <CUSTNMBR>C5624</CUSTNMBR>
  <DOCDATE>03-02-2011</DOCDATE>
  <ITEMNMBR>RENEW-DRM</ITEMNMBR>
  <UNITPRCE>30.00</UNITPRCE>
  <XTNDPRCE>450.00</XTNDPRCE>
  <QUANTITY>15</QUANTITY>
  <PRCLEVEL>DEFAULT</PRCLEVEL>
  <NONINVEN>1</NONINVEN>
  <UOFM>EACH</UOFM>
  </taSopLineIvcInsert>
  </taSopLineIvcInsert_Items>
  <taSopLineIvcInsertComponent_Items xsi:nil="true" />
  <taSopTrackingNum_Items xsi:nil="true" />
  <taSopCommissions_Items xsi:nil="true" />
  <taSopLineIvcTaxInsert_Items xsi:nil="true" />
  <taCreateSopPaymentInsertRecord_Items xsi:nil="true" />
  <taSopUserDefined xsi:nil="true" />
  <taSopDistribution_Items xsi:nil="true" />
  <taAnalyticsDistribution_Items xsi:nil="true" />
  <taSopMultiBin_Items xsi:nil="true" />
- <taSopHdrIvcInsert>
  <SOPTYPE>3</SOPTYPE>
  <DOCID>STDINV</DOCID>
  <SOPNUMBE>INV00000000000022</SOPNUMBE>
  <DOCDATE>03-02-2011</DOCDATE>
  <TRDISAMT>495.00</TRDISAMT>
  <CUSTNMBR>C5624</CUSTNMBR>
  </taSopHdrIvcInsert>
  <taSopToPopLink xsi:nil="true" />
  <taSopUpdateCreateProcessHold xsi:nil="true" />
  <taCreateSOPTrackingInfo xsi:nil="true" />
  <taMdaUpdate_Items xsi:nil="true" />
  </SOPTransactionType>
  </eConnect>
0
 
LVL 18

Expert Comment

by:Steve Endow
ID: 35031320
Hi Gary,

Thanks for that info.  At first glance, your XML looks okay.  I can't access my servers from the lovely Fargo ND airport and I'm going to be on a plane for the rest of the day, but I'll test the XML tomorrow morning and let you know what I find.

Can you also post the full eConnect error message, with the output of the node values and XML?

Thanks,

Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35031554
Thanks so much for looking at this for me.  We have 2 people from our company there at the conference in Fargo.  And yes, I know of the lovely airport to which you speak of :)

I can post the fulll eConnect error message but not sure I understand what you mean by "the full output of the node values and xml".  Is that different than the xml I posted earlier?

Anyways, here is the full error message:

Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned:
Error Number = 598  Stored Procedure taSopLineIvcInsert  Error Description = Customer Number does not exist
Node Identifier Parameters: taSopLineIvcInsert                                
SOPNUMBE = INV00000000000023
SOPTYPE = 3
Related Error Code Parameters for Node : taSopLineIvcInsert                                
CUSTNMBR = C5624
0
 
LVL 18

Expert Comment

by:Steve Endow
ID: 35031660
Thanks Gary. I thought that sometimes eConnect returns some XML in errors, but that could just be something I do in my code.

I'll test the XML tomorrow and see if it works for me.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35031679
Oh, it does but I thought that was just the output from the xml file it created.  I will post that here along with the error:

A first chance exception of type 'Microsoft.Dynamics.GP.eConnect.eConnectException' occurred in mscorlib.dll

Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned:
Error Number = 598  Stored Procedure taSopLineIvcInsert  Error Description = Customer Number does not exist
Node Identifier Parameters: taSopLineIvcInsert                                
SOPNUMBE = INV00000000000024
SOPTYPE = 3
Related Error Code Parameters for Node : taSopLineIvcInsert                                
CUSTNMBR = C5624

<taSopLineIvcInsert><SOPTYPE>3</SOPTYPE><SOPNUMBE>INV00000000000024</SOPNUMBE><CUSTNMBR>C5624</CUSTNMBR><DOCDATE>03-03-2011</DOCDATE><ITEMNMBR>SMARTFILL</ITEMNMBR><UNITPRCE>150.00</UNITPRCE><XTNDPRCE>2250.00</XTNDPRCE><QUANTITY>15</QUANTITY><PRCLEVEL>DEFAULT</PRCLEVEL><NONINVEN>1</NONINVEN><UOFM>EACH</UOFM></taSopLineIvcInsert> ---> Microsoft.Dynamics.GP.eConnect.eConnectException: Error Number = 598  Stored Procedure taSopLineIvcInsert  Error Description = Customer Number does not exist

   --- End of inner exception stack trace ---
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35032405
Are you starting the eConnect calls from Line to Header? Means, you start giving the line items  then the header.

Also, make sure that you're pointing to the right DB in your eConnect code.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35032531
Wow, ok, I feel like the dumbest person on the planet.  I was copying my code to a Word doc so I could add it to my reply to you when I noticed something odd.  The name of the property seting that I was using.

I have been asked before if I was sure that I was pointing to the right database.  And since I am storing my connection string in a property setting of my application, I opened the setting 2 or 3 times and confirmed that everything looked right.  What I failed to notice before is that my code was pointing to an older property setting that was indeed pointing to a different database.  GAWD, what an idiot!

I really don't know how to split up the points on this one as just about everyone told me to make sure I was using the correct database.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35032545
What I don't get is why a batch number is required?  Our accountant creates sales orders all of the time in GP and she tells me that she doesn't enter anything for a Batch ID and it works just fine.  The taSopHdrIvcInsert requires it but I don't know what to put there when I am not doing a batch?
0
 
LVL 18

Accepted Solution

by:
Steve Endow earned 167 total points
ID: 35032938
Glad you found that you were pointig to the wrong company.

  A batch is required for SOP transactions. Your GP install may have a mod to assign the batch, or the user may be selecting a batch first, which then defaults for subsequent transactions.

For eConnect, you will need to send a batch ID.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 18

Assisted Solution

by:Victoria Yudin
Victoria Yudin earned 167 total points
ID: 35032955
Gary,

I think I can help with that one.  What your accountant is doing is entering one transaction at a time and posting it right away.  That's fine for manual entry, but you cannot do that when importing (unless you are importing Bank Transactions).  GP has to save your transaction somewhere so that after the import is completed a user (or a process) can come by and post it.  A batch is required to store a transaction.  
0
 
LVL 10

Assisted Solution

by:Abdulmalek_Hamsho
Abdulmalek_Hamsho earned 166 total points
ID: 35033099
You can use <taCreateUpdateBatchHeaderRcd> to create the batch. I suggest you create a daily or hourly batch; what suitable for your business. Something like BatchID=(Name%Date%) or (Name%Date%HourOfTheDay%), and put all of the daily/hourly Sales Transactions in it.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35037696
Thank you all.  You have all been very helpful.  I posted this question on PartnerSource and never heard a word.  Thanks again!!
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35037864
I see how one could use taCreateUpdateBatchHeaderRcd to create a batch but how does that work when you are creating a sales order and then you might not create another one for 3 hours?  I mean say I use eConnect to create a sales order.  I have to have a batch number for it so I somehow need to know if the batch already exists or not.  If it does not, then I need to create it but taCreateUpdateBatchHeaderRcd requires things like Number of Transactions and Batch Total that I will not know.

Are you supposed to see if the batch already exixts and create one if it doesn't with a Number of Transactions as 1 and the Batch total the total of your sales order.  And then the next time a sales order is created you check to see that the batch already exists and if does then you increment the Number of Transactions and add the sales order total to the Batch Total?  If so how does one see if the batch already exists, get a reference to the batch, and read from the batch fields so that the new batch field values can b e calculated?

Thanks!
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35038329
You can either check table SY00500 to see if the batch is existed, or the eConnect returns an error that the batch is already existed if you try to recreate it.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35038372
Thanks!

How do I reference the batch field values?  Do I just get them from the Sy0500 table using a standard query and then update the values using taCreateUpdateBatchHeaderRcd?
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35038714
I didn't get your questioon.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35038817
Say I am creating a Sales Order.  I query the Sy0500 table for a batch with a batchNo of "MyBatch".  If it is not found, I create a new batch using taCreateUpdateBatchHeaderRcd.  If it is found, then I need to update it.  For instance, I need to increment the number of transactions.  So if the number of transactions is currently 4, I need to update the batch and change the number of transactions to 5 to reflect that I am adding another sales order.

I was just asking if the way for me to know that the current number of transactions in the batch is 4 is done by querying the database and not using some other eConnect method.
0
 
LVL 18

Expert Comment

by:Steve Endow
ID: 35038971
Hi Gary,

Unless you need to set specific values for the batch (i.e. override the posting date if you are using batch-level posting), you do not need to use taCreateUpdateBatchHeaderRcd or check SY00500.

You simply send a batch ID with your transaction and eConnect will automatically create the batch if it does not exist.  If the batch does exist, it will simply add the transaction to the existing batch and update everything for you.

Thanks,

Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35038990
nice.  Thanks,
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35039296
The taSopHdrIvcInsert has a required field named DOCID.  Can't find anything about it in the help.  In the sample code thay have a docID of "STDINV" but when I use that I get an error: Document ID is invalid.

Where do I get this value so that I can set it on the header?
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35039413
Nevermind I figured it out.  I found the table that contains the docIDs and STDINV wasn't in there.  So the error makes sense.

Thanks,
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35098403
Does anyone know if a Currency ID is required?  We just upgraded to GP 2010 and when I run my code, I get the following error.  I thought that makes sense because I didn't add a functional currency.  So I added one and when I run my code, I still get the error.  I looks like it is telling me that there is no functional currency setup but then it also says that CurrencyID was not passed in which I am not because I didn't think it was required but maybe it is?


Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned:
Error Number = 3442  Stored Procedure taSopLineIvcInsert  Error Description = Invalid Currency, a Functional currency must be set up
Node Identifier Parameters: taSopLineIvcInsert                                
SOPNUMBE = 8691            
SOPTYPE = 3
Related Error Code Parameters for Node : taSopLineIvcInsert                                
CURNCYID =  Note: This parameter was not passed in, no value for the parameter will be returned.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35098521
This turned out to be because I had setup the currency but I had neglected to add it as the default functional currency.  Here are the steps I followed to setup and add the functional currency in case anyone else stumbles across this post.

In the Great Plains application, click Tools on the menu bar, point to Setup, point to System, and then click Currency. This will open the Currency Setup window and select the desired currency.
Next click Tools on the menu bar, point to Setup, point to System, and click Multicurrency Access. This opens the Multicurrency Access Setup window.    
Grant the desired company database access to the currency set up in step 1.    
Click Tools on the menu bar, point to Setup, point to Financial, and then click Multicurrency. This will open the Multicurrency Setup window.
Set the currency, for example US dollars, as the functional currency.    
If you get a message about checklinks for the Multicurrency table in the company database, choose to checklinks.
0
 
LVL 1

Author Closing Comment

by:GaryRasmussen
ID: 35285514
Thanks for all the help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now