Skip to Content

How to know locked records of standard BO data

Dear Community members,

We have created custom addon action which is updating standard Purchase Order data.

The action logic is as follows.

1. Get PurchaseOrder records by query execute (with some specific query parameters).

2. Loop the extracted records and update some fields of each record

3. Save

But, if one of Purchase Order is locked by another session,

we got the error message which notify that some records are locked and

the whole custom action process fails.

Eg;

Extracted PO ID : 101,102,103

PO 102 is locked in another session.

Data update logic of custom addon action is failed for all 3 PO.

We would like to check in the extracted PO which are locked by others and which are OK to update.

So in the absl logic, we can skip the locked records to update and continue to update on others.

Is there any solution for this?

Thanks and Regards,

May

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 23, 2019 at 04:38 PM

    Hi May,

    this is a very interesting question. I doubt, that this would work in all cases if you would read now the data w/o the locks. Then someone just after your query opens a PO and then it fails again.

    If you really would like to avoid it, you need to split it maybe in smaller portions and save it.

    Best regards
    Marlene

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.