Updated Partial Rebuild of the Company QuickLook Screen using the ASP API

Hints, Tips and Tricks

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

Updated Partial Rebuild of the Company QuickLook Screen using the ASP API

  • Comments 8
  • Likes

This is a version of the Company Quicklook screen rebuilt using the classic ASP API back in 2008.  

There are buttons to call New Task and New Communication buttons. The button code references the source file and the jump destination.

[code language="javascript"]
var fileContext = "&F=companyquicklook.asp&J=companyquicklook.asp";
var NewTaskButton = CRM.Button('newtask','newtask.gif', eWare.Url(361)+'&HNA=183&newbtn=t'+fileContext);
var NewApptButton = CRM.Button('newappointment','newappointment.gif', eWare.Url(362)+'&HNA=183&newbtn=t'+fileContext);
[/code] 

Members of the Developer Program can download this from the Wizards, Utilities and Sample Code file library.

There is an example of the Company Quicklook rebuilt using the .NET API provided in the SDK resources available to members of the developer program.

Comments
  • Thank you Jeff it's working fine (in 7.1.d.4)!

  • Jeff, I have used this in 7.1.d.4 which on my system is CRM71, but you have "hard-wired" the tabletopborder.gif etc to CRM, and the images don't show : outputHTML += '<IMG SRC="/crm/Themes/img/color/backgrounds/tabletopborder.gif" HSPACE=0 BORDER=0 ALIGN=TOP></TD>';

    Is there a way to use a relative path or a funtion to return the correct instance of CRM?

  • Axiom

    There are 2 things you can use.  

    1)  The sagecrmnolang.js or accpaccrmnolang.js include file has a varible called sInstallName that contains the name of the CRM instance.

    2) The Theme preference of a user can be grabbed using

    var strTheme = CRM.UserOption("PreferredCssTheme");

  • Could you please tell me what the HNA Parameter in URL does and also the newbtn=t?

  • Jeff, This works well when clicking on new task and appointment, however if I open an existing task from the custom communication list page and click the Continue button on the task, I still get the 403 error.  I tried the following:

    sURL= String(Request.ServerVariables("URL")() + "?" + Request.QueryString );

    ListBlock.prevURL=sURL;

    but it does not seem to help.  

  • Jeff...

    Can you please let me know what HNA= mean in the URL?  I= & trid= are not in the above example.  However, I am wondering what those are as well.  I have come across them in ASP pages and I do not know what the URL is referring to.

    When adding a cancel button to an ASP page, is there a way to tell the system to return to the previous page you were on?  

    I am working on an Edit page, when I hit the change button, the fields open up for the user to modify and a "SAVE" button is available.  I have added a cancel button to the screen.  In CRM.URL(), I have entered the ASP edit page.  When I hit Cancel, it does return to the page...but I loose all my tabs.  I am thinking I need to add a custom jump value of T to my page...but I haven't figured out the syntax yet.  Or maybe I use F?

    If you can point me in right direction on this, I would appreciated it...Thanks!

    Thank you!

  • Hi Jeff

    Just picked this up to use in a 2017R2 system and it works really well with one minor issue...

    When you select the new tab the other tabs revert to the 'Classic' blue colour. Any quick fix?

    Thanks

    Roger

  • Roger

    Check your paths referenced inside the file - I had to modify the gifurl path to account for the new theme location to get the images.

    Also check the   (eWare.GetPage()) //use default tab group line is added at the bottom of the file (replacing the call to the specific tab group)

    This is working OK for me in a 2018 R1 beta, ergonomic theme.

    Tom