Vendor created
Fires when a new vendor record is created in Dynamics 365 Finance and Operations. This captures the moment a vendor master is first persisted, enabling downstream systems (procurement portals, master-data hubs, ERP integrations) to onboard the new supplier with its account number, name, group, and trading currency.
| Event class | MGCLatticeVendorCreatedBusinessEvent |
| Contract class | MGCLatticeVendorCreatedBusinessEventContract |
| Category | Accounts payable |
| Module | ModuleAxapta::Vendor |
| Label IDs | VendorCreatedBusinessEventName / VendorCreatedBusinessEventDescription |
| Trigger | VendTable.insert() -> every new vendor record (no filter) |
Trigger / Hook
- Extension class:
MGCLatticeVendTable_Table_Extension,[ExtensionOf(tableStr(VendTable))] - Exact CoC method signature:
void insert() - Firing condition: after
next insert()completes (the new vendor row is persisted), the event is sent. There is noorig()transition guard or type filter: everyVendTableinsert raises it, whatever the source (the Vendors page, data entities and integrations, or X++ logic). A vendor account created in several legal entities raises one event per legal entity. - Inserts that bypass the table's
insert()method (doInsert(), or set-based inserts with data methods skipped) do not raise it. - Timing: the event is sent inside the transaction that creates the vendor.
send()writes it to the business events commit log in that transaction and it is delivered after commit, so a vendor creation that rolls back never delivers the event. - A vendor created already on hold (Vendor hold other than
No) also raises Vendor hold status changed, withisNewVendor=true. The sameinsert()wrapper sends it right after this event, so this event arrives first (lowereventSequence). - Enablement gate:
BusinessEventsConfigurationReader::isBusinessEventEnabled(classStr(MGCLatticeVendorCreatedBusinessEvent))must return true before the event is built and sent.
void insert()
{
next insert();
if (BusinessEventsConfigurationReader::isBusinessEventEnabled(classStr(MGCLatticeVendorCreatedBusinessEvent)))
{
MGCLatticeVendorCreatedBusinessEvent::newFromVendTable(this).send();
}
MGCLatticeVendorHoldStatusChangedEventHandlers::raiseForNewVendor(this);
}
Payload Contract
One row per [DataMember], in declaration order (sourced from MGCLatticeVendorCreatedBusinessEventContract.initialize(VendTable)):
| JSON field | Display label | Type / EDT | Source | Notes |
|---|---|---|---|---|
legalEntity | Legal Entity | DataAreaId | _vendTable.DataAreaId | Company ID of the vendor record, in lower case (for example usmf) |
vendorAccount | Vendor Account | VendAccount | _vendTable.AccountNum | Vendor account number |
vendorName | Vendor Name | str | _vendTable.name() | Display method; resolves the vendor's party name |
vendorGroup | Vendor Group | VendGroupId | _vendTable.VendGroup | Vendor group identifier |
currencyCode | Currency Code | CurrencyCode | _vendTable.Currency | Default trading currency for the vendor |
crossReferences | Cross references | List of MGCLatticeCrossReferenceEventContract | MGCLatticeCrossReferenceEventHelper::listFor(VendTable) | Keys external systems hold for the vendor: one { externalSystem, externalKey } object per external system, ordered by external system, historical keys included; [] when it has none. See Cross-reference keys. |
Every Lattice event also carries the Lattice ordering and correlation envelope, inherited from MGCLatticeBusinessEventContractBase: eventSequence (Int64 - increasing across the whole catalog and all companies, allocated when the event is raised; it orders the events of one record, gaps are normal and permanent, see the README), correlationId (String - always Scope:Key; groups emissions that belong to one logical run and defaults to Event: plus a GUID unique to this emission) and schemaVersion (Int - the payload shape version; 1 for this contract). D365 F&O also adds its standard envelope fields to every business event payload: BusinessEventId, BusinessEventLegalEntity, ContextRecordSubject, ControlNumber, EventId, EventTime, EventTimeIso8601, InitiatingUserAADObjectId, MajorVersion, MinorVersion, and ParentContextRecordSubjects. Do not rely on the order of members in the delivered JSON.
This event does not join a run: correlationId is unique to each emission.
Example Payload
{
"BusinessEventId": "MGCLatticeVendorCreatedBusinessEvent",
"ControlNumber": 587412,
"EventId": "1F8C2A44-9B7D-4E21-BF3A-0C5D2E7A6B91",
"EventTime": "\/Date(1790236975000)\/",
"EventTimeIso8601": "2026-09-24T08:02:55.7061511Z",
"MajorVersion": 0,
"MinorVersion": 0,
"BusinessEventLegalEntity": "USMF",
"ContextRecordSubject": "",
"InitiatingUserAADObjectId": "{B54A55F4-E73D-ED35-6DA6-0A349DE850C1}",
"ParentContextRecordSubjects": [],
"eventSequence": 48187,
"correlationId": "Event:2a7e5c91-4b0d-4f63-8e1a-c6d9b3f0a725",
"schemaVersion": 1,
"legalEntity": "usmf",
"vendorAccount": "US-101",
"vendorName": "Fabrikam Electronics",
"vendorGroup": "10",
"currencyCode": "USD",
"crossReferences": [
{
"externalSystem": "LEGACYERP",
"externalKey": "V-20417"
}
]
}
Activation
In the D365FO client, go to System administration > Setup > Business events > Business events catalog. Find this event by name ("Vendor created") or by filtering the Category column to Accounts payable. Select it and choose Activate, then bind it to the target endpoint (for example an Azure Service Bus queue, Event Grid, or HTTPS webhook).
Related Events
- Vendor updated - sibling event sharing the same
MGCLatticeVendTable_Table_Extensiontrigger extension, fired onVendTable.update(). - Vendor hold status changed