IDC field to calculate company from Batch Type

We are using IDC/ECM for AP invoice entry.

We are having an issue where if a vendor with the same name exists in multiple E10 companies, IDC will always pick up the vendor ID from one company, which in many cases will be incorrect since our vendor IDs are not aligned cross-company.

Currently the company only comes into play once the invoice makes it to the workflow in ECM, using a datalink.

Is it possible to add company to the IDC Document Form Definition, and have it calculate based on the Batch Type assigned when it comes into IDC? Our Batch Types look like this: APINV_COMPANY1, APINV_COMPANY2, …

We have a similar issue where we have vendors with the same name (different purchase points) and it brings in the incorrect one. Not only that but is shows that we have two of them but the vendor ID is the same for both in IDC, not in Epicor.

Example:
Vendor 1 is ABC Company with an ID of ABCC001
Vendor 2 is ABC Company with an ID of ABCC002

IDC shows both of them in the drop-down name selection:

ABC Company
ABC Company

But no matter which one you choose, it brings in the ID of ABCC001, even if you choose the second option which should be ABCC002.

So I’m interested in hearing a solution because it may fix our issue.

Are you coming to Insights? I’m showing this exact thing at the EpiUsers session (don’t know exactly which session just yet).

We had the same issue and decided to keep everything separate for each company to make managing the slight differences easier. In general though, our solution is predicated by the fact that we know ahead of time which company the invoice is for - and this is how we do it.

Single IDC Batch with a Doc Type & DFD pair for each company. The batch also has a validation list for each company, with a parameter for that company. In our case, I created a SQL DB View for vendors (that includes the company and basic fields) and can take a parameter of company - that way the list is filtered for the company the AP Invoice is for.

Second, the batch client has two config specifics:

The folder it watches for documents includes the company #
image

The Batch name expression parses the folder name
$(DocDirName)-$(CurrentDateTime-yy-MM-dd-hh-mm-ss)
image

And third - the DFD contains a formula for 'Company": STRTRIM(SPLITGET((EVALEXPR("$(BatchName)")),"-",1))

This gets the proper company value into the metadata when it moves to ECM and then can be in the workflow. But mostly, the field in IDC can drive the validation and lookups in the DFD.

1 Like

I was not at Insights, but thank you very much for this! We have noticed that after the system learns the correct company vendor once, it works fine after that. If our processors continue to have issues with this then I will try to implement your solution.

You can change the view that is returned in the dropdown to include company and then grab it.
We only have one company but here is what I did for ship to address in SOA. I added the ship to number to the end of the dropdown with a pipe delimiter and then parse off to use in ECM. The

image

then to get the shiptonum field I do this calculation.

SPLITGETREV(FT_SHIP_TO_DESC, "|", 0)

I made a sample view in the IDC database with company in the name and Vend_Comp value field
image

1 Like

@Beth That is from the query of the view just using like name. If you added the company and then put it into its own field eg. FT_VENDOR_COMPANY and then add and Company = FT_VENDOR_COMPANY to that query and it would get the correct vendor.

SQLEXEC(STRJOIN("SELECT [VendorID] FROM [docstarIdcServerDb].[dbo].[VendorName_ID] where name like '",FT_VENDOR_NAME,"%' "))

SQLEXEC(STRJOIN("SELECT [VendorID] FROM [docstarIdcServerDb].[dbo].[VendorName_ID] where name like '",FT_VENDOR_NAME,"%' and Company = FT_VENDOR_COMPANY"))

image

1 Like

@gpayne Thanks for the info! I’m going to try this out to see if I can get this working!

1 Like