Having trouble sending values for UD Checkboxes on the APInvDtl table from ECM into Epicor. I created fields in ECM to hold these values and have tried sending them to Epicor via the Datalink and @Line_CheckBox02, but it fails to transfer properly. I’ve used similar methods with fields on the APInvHed table, but for some reason when I try for things on the APInvDtl table, the values get lost on their way over.
Anybody have any ideas about this? The fields I’m trying to send over are part of the Line Field Group.
Have any screenshots you can share to provide a bit more detail as to the setup you have that’s not working? Typically you can populate the field with a “True” or “False” option to then check or clear the checkbox, respectively.
For tax purposes, we have some checkboxes that distinguish whether a charge on an invoice is for freight or handling and then the invoice will show properly on reports down the line. I created variables and put them in the Line Field Group. They show up on the Lines grid and I can check a box, but the value never gets transferred to Epicor (always false). In both the Pre-Create and Create Invoice datalinks, I use these parameters:
PNP or IDC workflow? If PNP, you will likely need to run the Pre-Create, make your changes to the fields and then run the Pre-Create again. You can also put in variables on the outputs for those Line_Checkbox0# values to capture what is coming out of Epicor. Something as simple as zLine_Checkbox02 as an example, which would then show in the recording.
Yes, it is PNP workflow. Just a question, but why would I need to run the Pre-Create again if a similar datalink is called during Create Invoice step? Do values need to be consistent between the two?
As far as capturing what comes out of Epicor, I have tried doing some recording before with just using the same variable and it will input as true, but then the output is false. The screenshots below are from the Create Invoice step as we likely won’t check the boxes until after the Pre-Create step.
Values don’t need to be consistent between the two, but the Pre-Create is a pseudo step in that it isn’t creating anything and can be a bit tricky in what it does/doesn’t do. There are often times when we design the workflow to have the Pre-Create run multiple times depending on what we’re trying to accomplish. What seems to be happening here is that the Pre-Create is wiping out the values of your fields because it finds the checkboxes in Epicor to be clear (False). As such, it will then have the “False” value in that field which is going into the Create step. It is worth testing just the Create step with the values and not the Pre-Create as there doesn’t seem to be any reason to use them there. I could be missing something with that, though…
If you see values in the outputs, it’s possible the fields can receive the data in a temp field but not into a field group, it’s an error with the prechecks/precreates in all the workflows.
So, did some testing with the Create Invoice step and am getting the same result. Despite the input showing as True, the output always ends up as False. Even tried throwing a temp field that was not part of a field group in there and am just seeing False when I look at the recording.
In your outputs, try using local variables such as zLine_Shipping and zLine_Handling to see if they populate with the “True” value. These can then be used to set the field groups, as Scott suggested above.
In the pictures above, I used zLineFreight in one of the outputs. Was I correct in using it as just a field? Sorry, still kind of new to ECM so not sure if I’m doing things the typical way.
Based on the screenshot I see, it appears that you have created a Field, which is a global variable. You’ll want to test with a local variable.
Within ECM you have global and local variables. Global variables, which are $Field variables, allow that field data to be carried across multiple workflows. Local variables, which can literally be any acceptable text, allow that field data to be used only within the workflow in which they are declared.
Examples: $Field.zLine_Freight is a global variable zLine_Freight is a local variable
It could be the difference, but tough to say. You could create a datalink to handle this after the Create step and see if that works. Before creating the datalink, you could test this using the REST services to validate if it works there.
Field Groups are always a tricky thing to work with so I do wonder if that is having any impact on things…
Ok, have never gotten into creating datalinks or even using REST services before, but those sound like fun haha. We did just have an internal meeting to change some things and it will in turn let me handle this issue within Epicor directly, but if things come back up and I would need to handle something like this within ECM, I’ll definitely return to this.
Making one last effort to avoid the datalink approach, but I was wondering if anybody knew which APInvoice methods are called through the ECM process? I’m able to set fields for Miscellaneous lines in the Update method based on various conditions, but I can’t seem to access any of the Receipt lines (APInvDtl.LineType = R). Anybody know if there are any methods that could potentially access those lines? If not, I wouldn’t be that surprised. Or even if someone knows of a way to trace Epicor methods as an invoice goes through ECM?
There are several, if not a dozen+, that are called. The only method I am aware of for tracing them is if you have Epicor installed OnPrem and using a SQL trace to see which tables are impacted. The REST API services also list the potential tables and if you have Epicor open in your browser you can watch which calls are made through the browser development tools > Network option.
As for the Receipt Lines you mentioned, these would be found in the RcvDtl table.
Sorry, I meant Receipt Lines as in the invoice lines that were on a PO and got received. I have no problem accessing the Miscellaneous lines that get added to an invoice (Sales Tax), but whenever I try and display (in AP Invoice Entry) part numbers for the Received Goods lines, it doesn’t display anything. I’ll have to try the browser tracing. Haven’t done that in a while since we still heavily use classic screens haha
Interesting. The PO Invoice workflow, whether IDC or PNP, will eventually create the AP Invoice Entry in Epicor with the line details, which would have the part numbers they’re associated with. Perhaps I am missing what it is you’re referencing, though…
Trying to check specific UD boxes based on the part number, but can’t find the method that would automatically check the box when sending the invoice to Epicor. I’ve tried putting it in the Update, PreUpdate, UpdateMaster, and even GetByID methods, but it will never recognize the individual invoice lines. I’ve even gotten it to recognize the ds.APInvHed table and make a change to it, but when I loop over the Db.APInvDtl lines, it never even recognizes them to check the part number.
I’ve almost resorted to creating some sort of process for the accountants to check the invoices before posting, but was hoping I could figure out some way to automatically do so when pushing from ECM to Epicor.