Validation to trigger only on populated rows on Sales Orders and Quotations
Hello,
Hope everyone is safe during this pandemic. Was wondering if I could get some help with a validation. We have a validation in place that prohibits users to modify certain fields if the item is on a pick list or on a production order. The problem we encounter is that when the user tries to add another item to an already existing sales order, validation kicks in and it won`t allow.
In the trigger panel we have:
Formtype: 139
Item: 38
Column:3;11;...
Row:
Menu Uid:
FormMode: Update
Event: Validate[Leaving Field]
BeforeAction: True
Ignore on the rest of options.
In the Condition we have an SQL Condition
"SELECT CASE WHEN (SELECT COUNT(*) FROM "SBO_VOGUEUK_LIVE".OWOR T0 WHERE T0."OriginNum" = $[$8.0.NUMBER] AND T0."U_SalesOrderLineNo" = CASE WHEN (SELECT COUNT(*) FROM "SBO_VOGUEUK_LIVE".OITT T99 WHERE T99."Code" = $[$38.1.0] AND T99."TreeType" = 'S') > 0 THEN ($[$38.0.NUMBER])+1 ELSE $[$38.0.NUMBER] END AND T0."Status" <> 'L') + (SELECT COUNT(*) FROM "SBO_VOGUEUK_LIVE".PKL1 T0 WHERE T0."OrderEntry" = (SELECT T99."DocEntry" FROM "SBO_VOGUEUK_LIVE".ORDR T99 WHERE T99."DocNum" = $[$8.0.NUMBER]) AND T0."OrderLine" = CASE WHEN (SELECT COUNT(*) FROM "SBO_VOGUEUK_LIVE".OITT T99 WHERE T99."Code" = $[$38.1.0] AND T99."TreeType" = 'S') > 0 THEN $[$38.0.NUMBER] ELSE ($[$38.0.NUMBER])-1 END) > 0 THEN 'Block' ELSE 'OK' END FROM DUMMY"
Condtition result Block executes a function which shows the user a message.
Is there a way to make this validation kick in only on the rows that already have data?
Iniciar sesión para dejar un comentario.
Comentarios
0 comentarios