Notify user to complete Quote line Items

By | June 29, 2020

Quotes are the important aspect in any business, hence forth Sage CRM provides functionalities to handle them effectively and efficiently as well. One of those many feature is converting or promoting quote to order.

New Stuff: Display Selection field value as an Icon using Client Side API

In Sage CRM there is a button on quote summary screen “Convert” which allows user to promote quotes to orders.

Convert Quote
Convert Quote

If there are no quote line items selected for particular quote and we hit this button, it still converts quote in order. But in business scenario it doesn’t make any sense to create an order without any line item. Hence, in our blog we will see how to add validations on this button to not allow converting quote without an Line item.

We can achieve this using client side scripting and Ajax request/Server side scripting. Follow below step:

Change Convert button URL:

  • Navigate  through below path:
  1. Administration->Customization->Quotes->Screen->QuotesSummary
  2. Add below code on custom content of this screen:
QuoteSummary Screen
QuoteSummary Screen

Server Side Scripting:

Ajax request are sometime complicated to handle, here we have used Create Script to check if any line item exists for a particular quote. This code is written on quote Status field and values are stored into hidden field so that we can use them in client side coding. To add create script follow below steps:

  1. Navigate through below path:
  2. Add below code on custom content of this screen:
QuoteID = new String(Values("Key86"));
if(QuoteID == ""||QuoteID=="undefined"||QuoteID=="null")
	QuoteID = new String(Values("Quot_OrderQuoteId"));
	if(QuoteID == ""||QuoteID=="undefined"||QuoteID=="null")QuoteID="";

if(QuoteID != "")
    var QuoteLineSQL = "select * from QuoteItems where QuIt_Deleted is null and quit_orderquoteid = "+QuoteID;
	var QuoteLineRec=eWare.CreateQueryObj(QuoteLineSQL);

	var QouteLineItem = "";
		QouteLineItem = "Y";
Caption ="Status:"+'<input type="hidden" name="hdnHTML" id="hdnHTML" value="' +QouteLineItem+ '"/>';
Script on Status
Script on Status

Client Side Script:
Now, Lets look at Client side script to be added to Custom Folder. Just add the below function

function ValidationOnConvert()
	var QuoteLineItems=$("#hdnHTML").val();
	if(QuoteLineItems == ""||QuoteLineItems=="null"||QuoteLineItems=="undefined")QuoteLineItems="";
		alert("Quote Line items are not added for this Quote");

This will now prompt user an alert message whenever user tries to convert any quote to order without adding any line items to it.


Hope this helps!

About Us

Greytrix – a globally recognized and one of the oldest Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3Sage IntacctSage 100Sage 500 and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like  Greytrix Business ManagerSage CRM Project ManagerSage CRM Resource PlannerSage CRM Contract ManagerSage CRM Event ManagerSage CRM Budget PlannerGmail IntegrationSage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Champion ISV Partner for GUMU™ Sage X3 – Sage CRM integration also listed on Sage Marketplace.

For more information on our integration solutions, please contact us at We will be glad to assist you.

3 thoughts on “Notify user to complete Quote line Items

  1. Kizzie Fearheller

    Hello , all website webmaster need SEO tool to check and find new keyword and analyes websites by using the best seo tool AHREFS now for just 10$ monthly you can use use this golden tool while it costs more than 150$ monthly , you can get trial as well >>

  2. Pingback: Remove Help button link from screens - Sage CRM – Tips, Tricks and Components

  3. Pingback: Calling DLL method and .asp Page on New Tab. - Sage CRM – Tips, Tricks and Components

Leave a Reply

Your email address will not be published.