hi
i try to use the code you show above in a by design system
please explain me
some information aboute this line
if (item.MessageSeverityText == "E" && item.MessageID.content == "AP_ESI_COMMON/101") {
because when i try out this code on a salesOrder locked object
i never get this
item.MessageID.content == "AP_ESI_COMMON/101"
i see a message
like this :
""
is it also for check if object is locked
i see a problem
after i get one object that locked
it looks like all other object are locked also
can you help me ?
below is my code
var currentDate = Context.GetCurrentGlobalDateTime();
var currentDate1 = currentDate.ConvertToLocalNormalisedDateTime();
var SalesOrders = SalesOrder.QueryByElements;
var SalesOrderDate_SelParams = SalesOrders.CreateSelectionParams();
SalesOrderDate_SelParams.Add(SalesOrders.Status.ItemListCustomerOrderLifeCycleStatusCode, "I", "EQ", "1");
SalesOrderDate_SelParams.Add(SalesOrders.Status.ItemListCustomerOrderLifeCycleStatusCode, "I", "EQ", "2");
var SalesOrderData_Results = SalesOrders.Execute(SalesOrderDate_SelParams);
var ValidSalesOrderList : collectionof SalesOrder;
foreach (var SO in SalesOrderData_Results)
{
var uuid;
uuid = Library::UUID.ParseFromString(SO.UUID.content.ToString());// Opp ID 12450
var messages;
var lock;
messages = lock.MessageTypeItem;
var validationFailed : Common:Indicator=false;
var a;
if (!lock.IsInitial() && messages.Count() > 0)
{
foreach (var message in messages)
{
// if(message.MessageSeverityText == "E" && message.MessageID.content.ReplaceRegex("[[:space:]]","") == "AP_ESI_COMMON/101")
if (message.MessageSeverityText == "E" && message.MessageID.content == "CL_CDA_DOCHD/000")
{
validationFailed = true;
break;
}
}
lock.Clear();
messages.Clear();
}
if (!validationFailed)
{
ValidSalesOrderList.Add(SO);
}
}
SalesOrderData_Results = ValidSalesOrderList;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.