How to Exclude Auto-Opportunities created in Sage CRM?

By | August 23, 2017

Sage CRM’s Opportunities is the heart of every potential sale done with the Customer. These opportunities further helps to track/maintain the Quotations and Orders raised against the Sale. However, CRM’s feature of allowing the Users to create direct Quotes or Orders in CRM is also not left unnoticed, which can help the Users to maintain direct Sales Order linked to the Products. But what is the alternative to exclude the auto-opportunities generated through such direct quote or order creation in CRM?

New Stuff: Modifying the values of User Select field of Email Editor Screen in Sage CRM – Part 2

One of Client had come up with a requirement of excluding/deleting all the auto-opportunities from the system. One of the main reason for doing so was to stabilize the Pipeline and Forecast Amount as these opportunity records used to remain unattended/updated. On analyzing I was able to find that these records have some of the fields set to null like forecast, close by, certainty, priority etc. So based on this values we thought of excluding the opportunity.
Below are the steps that needs to be followed –

  • Step1: Create the dummy field in opportunity entity, for example Oppo_flag.
  • Step2:   Create the table Level script in opportunity entity.

Go to Administrator -> Customization -> Opportunity -> TableScripts ->New.
Give name as Opportunity and add below given script in InsertRecord() function, Click on save button.
var sCertainty=””;
sCertainty=new String(FormValues(“Oppo_Certainty”));
if(sCertainty==”null” || sCertainty==”undefined” ||sCertainty==””)
{
sCertainty=new String(Values(“Oppo_Certainty”))
if(sCertainty==”null” || sCertainty==”undefined” ||sCertainty==””)
{
sCertainty=new String(CRM.GetContextInfo(‘Opportunity’,’Oppo_Certainty’))
if(sCertainty==”null” || sCertainty==”undefined” ||sCertainty==””)sCertainty=””;
}
}
var sClose=””;
sClose=new String(FormValues(“Oppo_TargetClose”));
if(sClose==”null” || sClose==”undefined” ||sClose==””)
{
sClose=new String(Values(“Oppo_TargetClose”))
if(sClose==”null” || sClose==”undefined” ||sClose==””)
{
sClose=new String(CRM.GetContextInfo(‘Opportunity’,’Oppo_TargetClose’))
if(sClose==”null” || sClose==”undefined” ||sClose==””)sClose=””;
}
}
if(sCertainty==”” && sClose==””)
Values(“oppo_flag”)=”YES”;

  • Step3: Now change the views which are executed for finding the opportunity.

Go to Administrator -> Customization -> Opportunity -> Views.
Open the vListOpportunity and click on Change button and add the following condition at the end of the code and save the view.
“and oppo_flag is null”
Do the same for vSearchListOpportunity view.
Now create the New order, Opportunity which was created against the order is excluded from the Opportunity Pipeline as well as from the Find Menu option.

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

Greytrix has some unique integration solutions for Sage CRM with Sage ERPs (Sage Enterprise Management (Sage X3), Sage Intacct, Sage 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 migrating of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace.

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