Skip to content
+1-888-319-3663

COMMUNITY FORUM

Document task based on error code

Jim asked 4 years ago
We have a map that creates cash receipt transactions and corresponding apply records.  One of the errors that comes up is:
Error Number = 7  Stored Procedure= taRMCashReceiptInsert  Error Description = Document number already exists in either RM00401, RM10101, RM10201, RM20101 or RM30101 
This error means that the GP payment number was grabbed and used by a different cash receipt transaction before being committed by the current transaction.  When this happens the fix is to re-run the map.
Ideally I’d like to have a task on document fail such that if the failure is because of this error 7, the document would be reprocessed.
Is there a way to do something like that?
Answers
Patrick Roth Staff answered 4 years ago
Jim,
That’s a good question and the answer is “it depends”.
Running a 2nd map on “after document failure” isn’t an issue.
More the problem is “how do I process ONLY the data for this document in the 2nd map”.
When you have a run map task, you can choose to have the map data passed or not.  But if you do, then you get ALL the data – not just the current document.
But what you could do is set a global variable (like GBL_KEYFIELD) to the document you are working with.
And assuming that the source data is SQL based (or if excel odbc query on a spreadsheet)
you could then do a query like:
select * from MySourceTable where CustomerNumber = ‘GBL_KEYFIELD’
Now SmartConnect would just pull in the records for that Customer (or doc number or date or whatever it is that is your Key Field from the original map so you can find the same records).
Now when the 2nd map run, it just processes that failed data.
 
 

If you would like to submit an answer or comment, please sign in to the eOne portal.