Overview
The VendTable is the core vendor master data table in Microsoft Dynamics 365 Finance and Operations. It stores essential vendor information including contact details, payment terms, and account settings.
Key Fields
| Field Name | Type | Description | Required |
|---|---|---|---|
AccountNum |
VendAccount | Unique vendor account identifier | Yes |
Name |
Name | Vendor name | Yes |
VendGroup |
VendGroupId | Vendor group classification | Yes |
Currency |
CurrencyCode | Default currency | Yes |
Key Methods
- find() - Static method to find vendor record by account number
- exist() - Check if vendor account exists
- validateWrite() - Data validation before record save
Common Usage Examples
Finding a Record
// Find record by ID
VendTable vendtable = VendTable::find("RECORD_ID");
if (vendtable.RecId)
{
info(strFmt("Record found: %1", vendtable.displayValue()));
}
// Check if record exists
if (VendTable::exist("RECORD_ID"))
{
// Record exists, proceed with logic
}
Creating a New Record
// Create new record
VendTable vendtable;
// Set required fields
// vendtable.FieldName = "Value";
if (vendtable.validateWrite())
{
vendtable.insert();
info("Record created successfully");
}