Thursday, April 5, 2018

F4311FSBeginDoc 0001 Record Invalid


F4311FSBeginDoc 0001 Record  Invalid


I spent far too long today trying to solve the following response from F4311FSBeginDoc:

<error code='0001'>Error: Action Invalid</error>
<error code='1456'>Warning: Not in Original Mode of Entry    WARNING</error>

TL;DR: F4311FSBeginDoc szOrderSuffix must  always be "000", even when making change orders.  The F4311EditLine szOrderSuffix values will use the proper number, such as "001", "002" et cetera.


Our integration code in C# uses the following Master Business Functions when making a Subcontract/PO change order:

F4311FSBeginDoc
F4311EditLine (for each line)
F4311EditDoc
F4311EndDoc

They are pretty straightforward to use, especially compared to writing AP or AR invoices.

But today I was refactoring and testing some code and suddenly I could no longer make change orders!

Whenever I posted to F4311FSBeginDoc, I kept getting 0001 Action Invalid, and 1456 Not in Original Mode of Entry.

What the heck?  The code I was modifying  had been working for years, and was working fine just a few days ago.   But I was re-implementing the mappings in what I felt was a simpler structure that more clearly separated the data which is meaningful to end-users versus the "housekeeping" data such as mnJobNumber, szComputerId, and all that jazz.

After a few very frustrated hours, which included rebooting my JDE application server multiple times and diving deep into jdeDebug logs, I found the answer.  Sadly, the answer was sitting in the code which I had originally copied my new code from:

begin.Params.szOrderSuffix.Value = "000"// f4301.phSFXO; this must always be 000


Through all those hours of testing, delving, pulling my hair out, I had managed to miss this comment.  Granted, that comment could have said a lot more, but once I saw it, it was painfully obvious.

Why painfully?  Well, this particular method was written sometime in mid 2016.  Its predecessor, in yet another version of the code, was written in 2012.  And at that time I re-discovered the same issue.  "Re-discovered"?  Yes, because I know that I had implemented it before in 2008, and the original time I wrote that code and discovered that issue was probably in 2004, in Visual Basic 6.  

So - this time I'm writing it down, because while there may be a helpful comment in the code (there will be for sure), my first instinct is always to search online.  And that search can lead me down many wrong paths, and wind up wasting a day or more.

Key words like:  JDE, F4311FSBeginDoc, "1456 Not in Original Mode of  Entry", xmlinterop, BSFN.

4 comments :

sugan2v said...

Thank you for sharing your excellent post .if it may present clinic and dental hospital.

Dental Clinic in Chennai
Best Dental Hospital in Chennai

Unknown said...

As you have now understood the usage of ‘Record and Playback’ tool, the following are the different posts using which you can explore the functioning of ‘Selenium IDE’
selenium chennai

Aishwarya said...

A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
Asset Management Software
Asset Tracking Software
Asset Management Software India
Asset Management Software Chennai

mehul said...

Dr. Prabhu Dental Studio is providing the best dental service. All types of dental issues solved here.
This is a very useful post and relevant post. It is full of information and clears all the doubt. Thanks for this post. Keep blogging. Dental Clinic In Velachery
Dental Surgeon in Velachery
Dentist In Velachery
Dental Hospital In Velachery
Best dentist in velachery
Best Dental Clinic In Velachery
Dental hospital in Velachery
Pediatric Dentist In Velachery Chennai
Dental Hospital In Velachery Chennai
Dental care in velachery