Use the Configurator to look up VendorNum from VendorID

Hi,

Is there any way to look up the VendorNum from inputting the VendorID during product configuration?

I have created a combo box with a dynamic list inside which returns the VendorNum, but I cannot now write this to any other fields, despite writing the following code;

Inputs.decVendorNum.Value = Inputs.cmbVendorNumFinder.Description

The VendorNum is the only display field in the combo box, but still will not write it’s value… any ideas?

Thanks,

Richard

I use code to collect the information. You would create a User Defined Method and call it on the VendorID field change. Here is an example of a method I created hopefully it will give you a starting place…

string CompanyID = “10”;

Erp.Tables.Resource Resource;

string myToolData = string.Empty;

var Resource_Recs = (from Resource_Row in Db.Resource

where Resource_Row.Company == CompanyID

&& Resource_Row.ResourceID == ToolNum

select Resource_Row).FirstOrDefault();

{

var ResourceRow = Resource_Recs;

if (Resource_Recs != null)

{

myToolData = Resource_Recs.Description;

}

} /*** Resource ***/

return myToolData;

Brenda J. Mohr

Humtown Products

2 Likes

We use the same thing. Here is our ud method that we pass a part number to and get the related vendornum recorded in part plant.

// Returns a Vendor Number for a Given Part Number.
string xPart = Part_Number;

Erp.Tables.PartPlant xPartPlant = (from xrow in Db.PartPlant where xrow.Company == Context.CompanyID && xrow.PartNum == xPart
							select xrow).FirstOrDefault();
if(xPartPlant != null)
{
return System.Convert.ToInt32(xPartPlant.VendorNum);
}
else
{
return 0;
}
1 Like

That’s brilliant thanks, useful for a lot of other lookups too!