Interview Questions

Wednesday, March 26, 2014

Delete record from PurchTable and PurchLine for specific record

static void JobX(Args _args)
{
    purchtable  table;
    purchline   line;
    ;
    select table where table.PurchId == '000623';
    {
        select line where line.PurchId == table.PurchId;
        {
            line.doDelete();
            table.doDelete();
            info(strfmt("%1,%2",line.PurchId));
        }
    }
}

No comments:

Post a Comment