reInsert table by update record set - Microsoft Dynamics 365 Vietnam

Microsoft Dynamics 365 Vietnam

Song Nghia - Microsoft Dynamics 365 Vietnam

Breaking

Tuesday, September 24, 2019

reInsert table by update record set

reInsert table by update record set

Song Nghia - Technical Consultant
static void Job60(Args _args)

{

    VtvPCPermissionTable permissionTable, permissionUpdate;

    VtvPCPermissionLine  permissionLine, permissionLineUpdate;

    RecordInsertList TableToBeInserted = new RecordInsertList(tableNum(VtvPCPermissionTable));

    RecordInsertList LineToBeInserted = new RecordInsertList(tableNum(VtvPCPermissionLine));

    while select permissionTable
    {

        permissionUpdate.Description = permissionTable.Description;

        permissionUpdate.SessionGroup = permissionTable.SessionGroup;

        TableToBeInserted.add(permissionUpdate);

    }

    delete_from permissionTable;

    TableToBeInserted.insertDatabase();

}