on 2020 Jun 25 8:21 AM
Hello Experts,
We have a scenario where we are updating data in Ticket Object from Activity using ABSL. But if the user is editing the ticket, then update to such ticket fails. We need to check if the ticket is being locked by any other user and if yes we will be showing an error message in activity from SDK. But I was not find any such method. By any chance, can we check if the object is being locked by user using ABSL?
Thanks in Advance,
Gayatri
Hi Gayatri,
you may try the following code snippet.
import ABSL;
import AP.PlatinumEngineering;
//...
var locked = false;
var checkLock = BOAction.CheckLock("ServiceRequest", "http://sap.com/xi/AP/CRM/Global", "Root", ticket.UUID.content);
if (checkLock.MessageTypeItem.Count() > 0) {
foreach (var item in checkLock.MessageTypeItem) {
if (item.MessageSeverityText == "E" && item.MessageID.content == "AP_ESI_COMMON/101") {
locked = true;
break;
}
}
}
if (locked) {
//...
}
I did use something like this a few months ago, so I am unsure if it still works, but feel free to experiment with it. Also keep in mind that the PlatinumEngineering libraries are not offically supported by SAP in case it does not work (now or in the future).
Best regards
Jürgen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.