Custom Prompt/Warning

Hello, I want to add a prompt so if they add a line to orderdtl with a 0 price on the part master it shows a message saying this Product is at Zero Value.

I would expect that to be relatively easily tacked with a Data Directive BPM on the OrderDtl with a conditional statement with something along the lines of the ttOrderDlt.UnitPrice field of the added or changed row is equal to the 0 expression and a message box hanging off the true side after the conditional.

You may also want to identify another ‘Price’ field but it would depend on the process your company follows.

Hello. I have done this in the past with a Data Directive. It can be as simple as the Start block, a Condition block, and a Show Message block designed as an In Transaction directive. Take a look and see if that doesn’t get you on the right track.

Just a Method Directive on PRE Update, preferrably PRE MasterUpdate.

“Data triggers are the last line of defense not the first. They can be massively abused and have caused many performance problems in the past when misused.
The problem with them is the same as exists with triggers in SQL. The context of what is happening is a single row. When you look at a service Update method, it’s a hierarchical graph of data - a Tableset / DataSet. You know the context of what is going on. You have the header and the line items. In a data triggers (or sql) you don’t have that context You are forced to do extra lookups, some calculations, etc to figure out the context of why am I here. That costs cpu cycles. Potentially lots of them.” - Bart Elia


image

Method Directives:

  • Pre, Post and Base processing logic
  • Access to BOs
  • Ideal place for Validations / Exceptions / Data Changes

In-Tran:

  • Executes after standard Entity Framework data triggers
  • Executes within a transaction, as a part of the trigger pipeline
  • Immediately processes affected row
  • Processes one row at a time (two rows for update operation (RowMod = “” is old row)
  • Can change data on save
  • — The In-Tran should never if it can throw an exception, it is very very expensive rollback.
  • You shouldnt access BOs in here!

Standard:

  • Executes when service method call has completed
  • Executes only if service method completes without exception
  • Processes batch of affected rows at once
  • Does not affect data save
  • Ideal place for integration operations (Audits, Email, Logging, Notifications, API)
1 Like

ohh i have this screen

something like this