Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, September 26, 2017

An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

Hi,


Record conflict errors.

You needs to block the records to your session these are the ways you can lock the table records.

1. ttsbegain and ttscommit will also plays this role.

2. OCCEnabled true the property in table level.

3. In X++

a. select statement.

 select pessimisticLock purchTable where purchTable.PurchId == "XXXXX";

b. recordset statement.

update_recordSet pessimisticLock purchLine setting
            RemainInventPhysical = 0,
            RemainPurchPhysical   = 0,
            PurchStatus           = PurchStatus::Canceled
            where purchLine.PurchId == purchTable.PurchId;


Thanks,
Alfasith

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...