Elusive Vendor Attribute Field

I am investigating a simple BPM that checks a vendor record to see if attributes are applied to them. After looking at the Supplier Maint screen, I see the Attribute boxes aren’t tied to a dataview. I ran a trace and found the attributes are pushed to a string in the Vendor table.

<changedValue tableName="Vendor" rowState="Modified" rowNum="0" colName="VendAttrString"><![CDATA[Bacon~Burger]]></changedValue>

The problem is, I can’t get to the .VendAttrString field in the vendor table in a BPM.

When I try Vendor.VendAttrString I get a “Vendor does not contain that field” error.

When I try Vendor[“VendorAttrString”] I get a null runtime error.

My hope is to find someone out there that has checked attributes on a Vendor or Customer record with a BPM, and to ask how they did it.

Thank yee!

These are stored in the VendAttr table.

You can use the condition type “Custom code is valid

image

with the following code to test if the Vendor has a specific Attribute

if(Db.VendAttr.Where( r =>r.Company == callContextClient.CurrentCompany && r.VendorNum == VendNum && r.AttrCode == "BCN").Select(r =>r.AttrCode).Count() > 0 )
  return true;
else
  return false;

That tests if the Vendor has the Attribute “BCN”. In my example the variable VendNum is the Vendor.VendorNum.

1 Like

Thank you both for your input! I suppose I missed VendAttr in the trace somewhere. I appreciate it.

It isn’t in the trace. Alas, some things you just have to look for manually…

1 Like

Hi Jeremy,
I want to do exactly this same thing.
I figured out the vendAttr but I can’t figure out how to add a new record to this table via the BPM without using custom code.
Are you able to give me some details around what you did?
I’m an experienced coder if it comes to that but I don’t have a lot of specific experience with the coding within Epicor.

Cheers,
Brian.

Hello! I don’t quite remember why I needed to hit the VendAttr table, but I know you need custom code to add a new record within a table in Epicor.

VendAttr newRow = new VendAttr();
Db.VendAttr.Insert(newRow);

But ya, code is needed to do that from my experience (within a BPM of course).

Hello All. So the only way you can add new values to Vendor Attributes is via the custom code that Jeremy illustrated? How weird that this isn’t a readily accessible table in the Setup folder. :thinking:

My customer has values in the Attributes table that they must have had entered several years ago when they first went live. At that time, those attributes meant something but nobody used them. Now they are interested in using them and I can’t see how they got in there or how to update them. :frowning_face:

You can absolutely add attributes via the UI. Search for “Attribute” in your menu.

Before coming to this forum, I searched Application Help, the system menu, the Actions menu, etc. I don’t see the UI for this. What is the path to the UI?

You have a few options:

Material Management / Supplier Relationship Management / Setup
Sales Management / Customer Relationship Management / Setup
Sales Management / Case Management / Setup

Attributes can be used for Customers as well as Suppliers.

Once they are set up, you can apply them on the Attributes tab of either Supplier or Customer maintenance.

1 Like

Thank you, thank you, thank you! I knew I had seen it in a Setup before, but I could not remember where. God forbid it was actually under Sales Order / Setup, or Accounts Receivable / Setup, or Purchasing / Setup, or Accounts Payable / Setup. Also, when searching for it, I typed it as Attributes instead of Attribute. Ugh!