Skip to Content

Unit Price on Purchase Quotation needs be filled


I'd want a help to make a query to makes the Unit Price ( PriceBefDI ) on the Purchase Quotation menu be required, and the system doesnt let the user update or add a new purchase quotation if the Unit Price is empty or if it was not filled.

Thanks in advanced.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 14 at 12:46 PM

    Hello Bruno - you would need a Stored Procedure like this. You need to check for both empty (no entry mande - IS NULL) or zero ( = 0), because some End Users will put in zero to get around the non-entry portion of your Stored Procedure. I imagine you would want it for both Add (A) function and Update (U) function. PS - I do not have a system handy to test this out - just wrote it from the top of my head while sitting in this cafe waiting for a train to head out...I believe a Purchase Quotation is an Object Type of 540000006 and the field name is from your question...

    Let us know if this works for you!!!

    Regards, Zal

    IF @transaction_type IN (N'A', N'U') AND 
    (@Object_type = N'540000006') 
    If EXISTS (SELECT T.docentry 
    FROM PQT1 T 
    WHERE T.docentry = @list_of_cols_val_tab_del and 
    (T.PriceBefDI IS NULL or T.PriceBefDI  = 0))
    SET @error = 14 
    SET @error_message = N'Please enter the Required Price for the Line' 
    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14 at 01:13 PM

    Hey Zal ! Thank you so much, it works !

    I just needed put a ')' in your query.

    You are very prestative, have a good day.

    Add comment
    10|10000 characters needed characters exceeded

    • More than welcome, Bruno. Yes, I noticed I was missing a parehtheis also after posting. Good to see you figured that out.

      And thanks go to you for marking this "Answered"...

      Regards, Zal