Adding Extra Buttons to the Group Details Screen

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Adding Extra Buttons to the Group Details Screen

  • Comments 8
  • Likes

I have written another article that discusses how to add an extra button to the Saved Search Screen.

That article discussed how most system screens can have additional action buttons added to them using the Buttons Group feature.  But two important exceptions are the Saved Search screen and the Group Details screen.

This article discusses how to add extra action buttons to the Group Details screen

To add a new button you will need to navigate to

Administration -> Advanced Customization -> System Menus

Select the "GroupButtons" Tab Group Name.

Although you can edit this like any other menu choice there are a two points to mention

  1. The SQL Tab Clause is ignored.
  2. The selection list shows the names of images from the icons folder 
  • C:\Program Files\Sage\CRM\[installname]\WWWRoot\Themes\Img\[ThemeName]\Icons
  • C:\Program Files\Sage\CRM\CRMDPP\WWWRoot\Themes\Img\Color\Icons

but actually the images need to be in the buttons folder

  • C:\Program Files\Sage\CRM\[installname]\WWWRoot\Themes\Img\[ThemeName]\Buttons
  • C:\Program Files\Sage\CRM\CRMDPP\WWWRoot\Themes\Img\Color\Buttons

In order to select an image and have that image display correctly as a button, then the image must exist in both folders.

Context Available to ASP pages

The context available to ASP pages (and .NET extensions) changes according to the logged on user and which group was accessed.

For example

http://[servername]/[installname]/CustomPages/Test.asp?SID=30356227028747&F=&J=Test.asp&Key0=4&Key4=4&Key25=111

Key Values available in Context

The Key0 value within the URLs above indicate which entity is in context.  I have written about the Key Values in the article "Long List of Key Values for Sage CRM".

  • Key0 = 4 would indicate that the user is main context.
  • Key4 = 4 indicates that the current user has the user_userid of 4. e.g. Susan Maye in demo data.
  • Key25=111 would indicate that the user has selected the Group of value 111 "USEastContacts"

Groups are stored in Meta Data in the custom_reports table.  You can read more about Group definitions in the article "Reports, Saved Searches and Groups".

You can read about manipulating Groups in COM API in the article "Creating a Dynamic Group in Sage CRM using the COM object TargetLists".

Comments
  • Hi Jeff,

    many thanks for this cool description.

    regards

    Christian

  • Hi,

    Thank you for this Blog. This works fine to call ASP Pages.

    But can you call costumdotnetdlls too?

    When I am changing the "Action" to costumdotnetdll, there is no button in the screen.

    How can I call costumdotnetdlls?

    Thank you.

    Regards

    Marco

  • Marco

    I have logged an enhancement request.  You'll have to use an ASP page to redirect to your .NET assembly

    <!-- #include file ="sagecrm.js"-->

    <%

    Response.Redirect(CRM.URL(432)+"&dotnetdll=RelatedEntities&dotnetfunc=RunREList");

    %>

  • Hi Jeff,

    Looks like I will have to call an asp page and not a direct url to a website if I want to pass the opportunity ID to the url.  what would the asp page look like if I wanted to have the following url

    http://localhost/quotingsystem/quote.aspx?OpportunityId=......

    Thanks

    Hilton

  • It's ok, I got it figured out.  Just used an eware.getcontext and a response.redirect.  Any idea what the syntax is to open the webpage in a new window?

    Hilton

  • Is it possible to create a button in the group details that is only visible on a group of companies and nothing else?

  • Hi Jeff,

    I've raised an issue with support about this capability in 2018R1-R3. The url does not contain Key25 anymore so the custom page cannot determine what group / targetlist is in context.

    Best regards,

    René

  • Rene

    Well spotted and thanks for raising this.  The work around would be to use either

    Client side

    document.referrer

    or Server Side

    request.servervariables( http_referer )