Set Info Message Color Based On Opportunity Stage

By | March 9, 2016

In one of our earlier blog we have discussed about Information and Error message feature of Sage CRM 7.2. Information and Error Message feature in Sage CRM v7.2

Now in this blog we are going to discuss the additional uses of Information Message in Sage CRM. We all know Sage CRM Pipeline shows the quick view of the current status of Opportunities, Cases, Leads, etc. based on the respective stages in CRM. This view is available under MY CRM, Team CRM tabs. Refer below screenshot.
PipelineNew Stuff:  Information on Date/Time/Number Preferences in Sage CRM

Some customers have the requirement of red to a lost opportunity and green for one, which is won  However we cannot modify the color stages of the pipeline to set as per our choice as they are something which are handled internally and is not available to us to alter.

A quick thought that came into my mind was to display info message color band based on our choice on Opportunity summary record so that user can be notified on Opportunity record at quick glance.

For e.g. If Opportunity stage is set to deal won then on its summary page we can show it in Green color as ‘Opportunity Won’ or for lost we can show in Red color so when user visits the Opportunity record, info message color only indicates the Opportunity stage.  All we need to do is set background color to Info Content CSS.  The above functionality can be achieved by using following scenario.

If for lost Opportunity we want to display info message in red color, we can do it by following below steps:

  1. Go to Administrator->Customization
  2. From Secondary entity , select Opportunity Progress– > Screens
  3. Select OpportunityStatusBox screen.
  4. On Custom Content write following code as shown below and click on save.
    Custom Content Code :
    <script>
    crm.ready(function()
    {
    if(document.getElementById(“_HIDDENoppo_stage”).value == “DealLost”)
    {
    crm.infoMessage(“Opportunity Lost”);
    $(“#_icTable.InfoContent”).css(“background-color”, “red”);
    }
    })
    </script>
    Custom_Content
  5. Now select any Opportunity from CRM whose stage is “Deal Lost”.  CRM info message be in red color as shown below:
    Lost
  6. And if for won opportunity, we want to show in green color then use the following code:
    <script>
    crm.ready(function()
    {
    if(document.getElementById(“_HIDDENoppo_stage”).value == “Sold”)
    {
    crm.infoMessage(“Opportunity Won”);
    $(“#_icTable.InfoContent”).css(“background-color”, “green”);
    }
    })
    </script>
    won

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.