Quote - warn user if there are no line items. How to?

SOLVED

Help please! I need to add a prompt to the system to warn users if they have not completed the Line Items for a Quote.

When a quote is created the "header" record is created and then you click on the New Line Item button to add the "detail" records. 

If a user does not click on the New Line Item button to add the detailed records, there is no warning or prompt from the system.  The system will allow the user to Convert the Quote to an Order even though there are no line items included on the Quote.

Is there a way that we can prompt the user that there are no line items on the quote if the user attempts to Convert, Print or Send the Quote?  If so, can someone point me in the right direction please?

I attempted to use the FormValues to grab the values on the screen.  However, that does not seem to work.  This was what I used...

var Reference = Values("quot_reference");
var Line = FormValues("quit_linenumber");
ErrorStr += "myReference = "+Reference+". myLine = "+Line+".";

Note, I tested this on a quote where the Line Items were complete so I could see what would be returned if it was populated.  I took a field from the header record and one from the detailed record just to confirm I had good syntax. :-)

This is what was returned. 

myReference = Q-20200021-1. myLine = .

How can I go about determining if there are any values in the Line Items area of the Quote?

Any assistance would be greatly appreciated!!! Thank you!

Parents Reply Children
No Data