✏️ Explanatory Question

Where is the CustVendorBlocked field used in D365 F&O?

👁 4 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

This field is used in the CustTable (for customers) and VendTable (for vendors). It appears in forms and business logic to enforce transaction restrictions based on the selected value.

How It Works in VendTable

  • The Blocked field in VendTable is of type CustVendorBlocked, which is a system enum. This ensures data integrity and restricts input to valid block statuses.​

  • In X++ code, you can set the field like this:

  • 
    vendTable.Blocked = CustVendorBlocked::Invoice;
    
    
  • This sets the vendor's block status to "Invoice" and restricts invoice posting for that vendor.​

  • The field is used in vendor forms and business logic to control which transactions are allowed for each vendor, such as payments, purchase orders, or invoices.

How It Works in CustTable

  • The Blocked field in CustTable is defined to use the CustVendorBlocked enum, ensuring only valid block statuses can be assigned.​

  • In X++ code, you can set the field like this:

    custTable.Blocked = CustVendorBlocked::All;

    This sets the customer's block status and restricts all transactions for that customer.​

  • The field is used in customer forms and business logic to enforce transaction restrictions. For example, if a customer is set to "Invoice", no new invoices can be posted for them.​