Pipeline demo

Hints, Tips and Tricks

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

Pipeline demo

  • Comments 14
  • Likes

I was asked to provide a demo of how one can build a clickable pipeline graphic using ASP and the COM api.  

Attached is a component that adds a Project entity.  Project has a stage field with values Alpha, Beta, Delta and Gamma.  After installing the component create a few Project records and populate the stage field.  Then go to the MyCRM -> Project tab to see the Pipeline in action.

 

Attachment: PipelineDemo.zip
Comments
  • Jack, this is a great demo, however my pipeline graphic is not displaying at all.  I'm using a custom entity called JOB.  I took your ProjectUser.ASP and renamed it JobUser.ASP (overwriting the ASP the entity wizard had created).  I of course re-pointed all of the proj_xxxx fields to job__xxxx and used my Job screen / list / filter.  I'm pretty confident the data is being returned as the lists populate as I select different users - but the pipeline itself never displays?  I'll gladly send you my ASP page and a screenshot, if you think it might help.

    Thanks for any insights you can offer, Jack.

    - Graham

  • Cool... Great job!

  • Hi Graham,  

    I'm happy to look at your asp.  Maybe you could create a new forum post and put it there?  Just put a link in this blogs post to the forum and I'll take a look at it.

    Off the top of my head I think that the pipeline will not show if the SQL that it is based on returns no results.  You could try looking in the SQL logs (once they're turned to full) to see what the query is that is being run... It will look like the SQL in the ASP page.  Run that SQL against your database to see what is getting returned.  I suspect it will be an empty record set.

    - Jack

  • Jack, thanks for that feedback.  In researching the SQL log, I discovered the job__userid filter was for the currently logged on user, and of course the Admin did not have any Jobs assigned to them.  When I logged on as another user with assigned Jobs, their Pipeline appears - so this is great!  Now if we can just get two key features included this would be really comparable to the  Opp's Pipeline in functionality: one, we need to be able to select a My CRM user from the drop-down at the top of the screen (in the My CRM context area) - if this is even possible, and two, we need a Team CRM version.  The Team CRM version is probably more useful as we can always filter on user from there - but without Team CRM, we have no roll-up Pipeline.  Let me know what you think.  Thanks again, Jack.

    - Graham

  • Follow up on Team CRM is that I commented out the iUserId line and added this CurrentChannelID:

    // var iUserId = CRM.GetContextInfo("user","user_userid");

    CurrentChannelID=eWare.GetContextInfo("channel", "chan_ChannelId");

    I then modified the SQL:

        var strSQL = "select job__stage, count(*) as t from Job with (nolock) where job__channelid="+CurrentChannelID+" and job__stage <> 'CLOSED' group by job__stage";

    However when I view the SQL Log, it's not capturing the selected Team ID, and so the page doesn't display at all - just blank frame:

        select job__stage, count(*) as t from Job with (nolock) where job__channelid= and job__stage <> 'CLOSED' group by job__stage

    So, so much for my meager efforts...

  • Key5 contains the selected team.  So try changing to CurrectChannelID = Request.QueryString('Key5');

  • Hi again, Jack - been very busy - thought I'd already updated this post but I guess I haven't.  The Key5 approach works great.  I now have two remaining issues.  First, clicking on the Pipeline itself does not refresh the list.  This of course is an extremely handy feature - is there a way to enable it on a custom entity pipeline?  Second, I have added a very simple Filter panel - basically just Job Type, Status and Stage.  The selection drop-down lists do not contain an option for "--All--", yet I see where your Project Status filter above does contain this option.  Any idea as to why my drop-down lists have the included captions plus "--None--", but not "--All--"?  Thanks, Jack.

  • Hi Graham,

    Clicking the pipeline and having it change the selection is illustrated in the demo.  Perhaps something is missing from yours?

    Re the drop-down lists, I'm not sure but perhaps the screen you are using as a filter is not of type Search Screen?

    Regards,

    Jack

  • Jack, is there any chance of getting this custom entity pipeline project ported over to the .Net API?

    - Graham

  • I found a small issue with this for CRM 7.1. The last line of CRM.GetPage('user') causes an issue when changing the user dropdown. It causes the page to move to the Dashboard tab instead of refreshing the current page. Removing the 'user' in GetPage (so its just CRM.GetPage() eliminates the problem and still keeps the topcontent as MyCRM with the user dropdown.

    Thanks for this post!  I would love to see this ported to the .net api. I tried several methods inside the .net api to replicate without success.

  • Hi Jack,

    have you also got a similiar Example on doing the same in .NET?

    Showing the pipeline is no problem, getting the List+Filterbox running is also no problem. The way how filtering in the Browser by clicking on the Pipeline is done is javascript, right? Are there ready-to-use functions within the .NET API? I couldn't find anything on this.

    Robert.

  • Lots of people asking about a .net version of this post, stay tuned

  • Thanks a million Jack! works like a charm in 7.1 sp2!

  • Help!  I attempted to run this component in version 7.3 SP3 and I am getting the following error.  Pipeline Demo jscript error: '1' is null or not an object Line:15 Char:4.  When I view the Log File the only thing that is there is --> OK PipelineDemo.  I know this is an old post, therefore, I am wondering if it is still valid.  Has anyone tried to use this component recently with success?  Any assistance would be greatly appreciated.