Posts

Showing posts with the label OnInserted

On inserted event of table D365 x++

[DataEventHandler(tableStr(SalesQuotationTable), DataEventType::Inserted)]     public static void SalesQuotationTable_onInserted(Common sender, DataEventArgs e)     {         SalesQuotationTable         salesQuotationTable = sender;         DH_SalesQuote              SalesQuote;         select firstonly SalesQuote             where SalesQuote.QuotationId == salesQuotationTable.QuotationId;         if (!SalesQuote.RecId)         {             SalesQuote.QuotationId  = salesQuotationTable.QuotationId;             SalesQuote.RefRecId     = salesQuotationTable.RecId;             SalesQuote.DocumentWorkflowState    = DH_DocumentWorkflowState::NotSubmitte...