• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Basis Code 8 function and Error Handling


Well Known Member
Hello all,
I'm using an advanced pricing Basis Code 8 adjustment to enforce UOM during order entry.
My function is pretty simple, it checks the UOM, then based on the condition will throw an error;

jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, (PJSTR)_J("141WIM"),(LPVOID)NULL);
return ER_ERROR;

This works fine, in that it is producing the error in the correct scenarios, and back on the sales order if I edit my erred line, by changing to a valid UOM, my error clears. However, if I cancel my erred line (cancel line button)the errors do not clear. I don't want to modify the cancel line button to clear my errors, is there something I'm missing that makes this a simple fix?

**Edit with new information.
As I've continued to work on this I need to update this post. My business function is creating a "form level error" and thats why it is not clearing.
For my application, I want to display the error, what causes a "form level error" vs a standard error?
Also, I've changed the code to use the data structure error handling parameters vs setting the error as shown above. Both cases produce the same result.

jdeStrcpy(&lpDS->cErrorCode, Error_CODE);
jdeStrcpy((JCHAR *)(&lpDS->szErrorMessageID),(const JCHAR *)_J("141WIM"));

Thanks for any suggestions.

JDE E1 9.1
Win/Sql 2008
Tools 9.1