Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9236

Re: How can I use my validation before save ,when I click the Icon of close form?

$
0
0

What information you want to validate? In this example from PO, I will block the transaction the the Project field is NULL or no value.

 

IF (@object_type = '22' AND @transaction_type IN ('A', 'U'))

  BEGIN

  SELECT TOP 1

  @LineNum = a.LineNum + 1

  FROM POR1 a

  INNER JOIN OPOR b ON a.DocEntry = b.DocEntry

  WHERE (a.Project = '' OR a.Project IS NULL) AND b.DocEntry = @list_of_cols_val_tab_del

 

  IF NOT @LineNum IS NULL

  BEGIN

  SELECT @error = -22,

  @error_message = 'Please define project at line #. '+ @LineNum +'. '

  END

END


Viewing all articles
Browse latest Browse all 9236

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>