Sage 100

 View Only
  • 1.  Sage 100 Premium delete SO line question

    Posted 05-20-2021 08:10
    Does anyone know what Sage 100 Premium actually sends to SQL when deleting a line from a Sales Order?  I am setting up a trigger on SO_SalesOrderDetail, and it fires for INSERT & UPDATE, but not on DELETE...

    ------------------------------
    Phil McIntosh
    President
    Friendly Systems, Inc.
    Asheville NC
    678.273.4010 ext 5
    ------------------------------


  • 2.  RE: Sage 100 Premium delete SO line question

    Posted 05-21-2021 09:10
    My quick test showed a DELETE FROM:

    DELETE FROM [SO_SalesOrderDetail] WHERE [SalesOrderNo] = '0000005' AND [LineKey] = '000027'; -- REMOVE(32663) SY_LineEntryDetail_bus.pvc@1359, CacheMode=-1 ​


    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 3.  RE: Sage 100 Premium delete SO line question

    Posted 05-21-2021 12:02
    Edited by David Speck II 05-21-2021 12:02
    Phil, did you check if your trigger fired after hitting Accept or just after click the "Delete Line" button on the Lines tab?  I would expect Premium to behave the same way Standard and Advanced does in how it doesn't actually delete the lines from the physical table until the order is saved.

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 4.  RE: Sage 100 Premium delete SO line question

    Posted 05-21-2021 14:04
    The trigger never fired, even after saving the order itself, or even deleting the order itself.

    ------------------------------
    Phil McIntosh
    President
    Friendly Systems, Inc.
    Asheville NC
    678.273.4010 ext 5
    ------------------------------



  • 5.  RE: Sage 100 Premium delete SO line question

    Posted 05-25-2021 12:04
    Works for SO header... don't know why it would be any different for SO detail.
    USE [MAS_TST]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TRIGGER [dbo].[DeleteMirrorRecords]
    ON [dbo].[SO_SalesOrderHeader]
    FOR DELETE
    AS
    BEGIN
    ...


    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------