Skip to content
+1-888-319-3663

COMMUNITY FORUM

Vendor Class info roll down

Jim asked 5 years ago
Is it possible to roll down vendor class info for new vendor ids, but not when updating existing vendor ids?  Currently we’ve got Roll Down From Vendor Class set as a constant value of 1, so class info is always being rolled down for the vendor info being imported.
Answers
Patrick Roth Staff answered 5 years ago
You’d have to pass that in then on the fly. 
You could use a multi-datasource map and then your source file and then link in the PM00200 table as well.
Make a new field “Exists” by checking one of the joined columns for null and if so then means doesn’t exist.
Then you can map the “Exists” into the Roll Down from Vendor Class so that only ones that do not exist get set to 1 and exists is 0 to not roll down.
Or leave the map as-is.  Instead make a vb/C# calculation.  In it, connect to your SQL data and query the PM00200 table to look for the vendor.
https://www.eonesolutions.com/tech-tuesday-query-data-in-smartconnect-with-net-scripting/
So if the Vendor Exists then return 0 and if not then return 1 so that it does not/does rolldown from class.
Then map this calculation to the Roll Down from Vendor Class.
Jim replied 5 years ago

perfect, thx

Jim replied 5 years ago

actually maybe not perfect. I added a field in the source file that’s returning 0 if the vendor exists in PM00200, or 1 if not. That field is now mapped to Roll Down From Vendor Class – but the payment terms are still being overwritten based on the class. Could a different value be needed there other than 0 or 1?

Jim replied 5 years ago

disregard my last comment – also had a problem in the formula to return the actual payment terms id value. working now. thx.


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