Call “No.” field “OnValidate” trigger via EventSubscriber:
(1) In this blog we have seen that how to call the “No.” field OnValidate trigger of the Sales & Purchase Line table.
(2) For that call Event of “No.” field “OnAfterValidateEvent”.
(3) Example 01 (In case of Sales Line Table): In this, we have to auto-update Sales line table custom fields (GSTGroupCodeForSale and HSNSACCodeForSale) from Item Master when “No.” field “On-Validate” trigger call, as shown.
![Call “No.” field “OnValidate” trigger via “EventSubscriber” of Sales & Purchase Line Table in BC D365 1 eventsubscriber example In case of Sales Line Table](https://erpconsultors.com/wp-content/uploads/2022/01/eventsubscriber-example-In-case-of-Sales-Line-Table.png)
(4) Example 02 (In case of Purchase Line Table): In this, we have to auto-update Purchase line table custom fields (GSTGroupCodeForSale and HSNSACCodeForSale) from Item Master when “No.” field “On-Validate” trigger call, as shown.
![Call “No.” field “OnValidate” trigger via “EventSubscriber” of Sales & Purchase Line Table in BC D365 2 eventsubscriber example In case of Purchase Line Table](https://erpconsultors.com/wp-content/uploads/2022/01/eventsubscriber-example-In-case-of-Purchase-Line-Table.png)