My CRM For:

SOLVED

I've added a new tab to the User menu to display a custom dot net list page. The list needs to be sensitive to the user selected in the My CRM For: drop-down list displayed by CRM. Unfortunately, when I choose a different user from the list, instead of re-displaying my custom list page, it displays the dashboard screen instead.

Is there a work-around for this?

Thanks

Parents
  • 0

    hi Jeff

    Thanks for the info. I've written the following work-around which fixes the url in the "My CRM for:" selection onchange handler. It may be of use to others:

    public override void BuildContents()

    {

    string prms = "&Act=432";

    prms += "&dotnetdll=" + ThisDotNetDll;

    prms += "&dotnetfunc=" + ThisDotNetFunction;

    prms += "&J=" + Dispatch.QueryField("J");

    prms += "&T=" + Dispatch.QueryField("T");

    AddHeaderContent(@"");

    //...

    //... other code

    //...

    base.BuildContents();

    }

    paul

  • +1 in reply to Paul C
    verified answer

    It appears that that code snippet didn't make it intact from the old CRM community site.  It should be:

            public override void BuildContents()

            {

                string prms = "&Act=432";

                prms += "&dotnetdll=" + ThisDotNetDll;

                prms += "&dotnetfunc=" + ThisDotNetFunction;

                prms += "&J=" + Dispatch.QueryField("J");

                prms += "&T=" + Dispatch.QueryField("T");

                AddHeaderContent(@"<script>$(function(){$('#SELECTUser').attr('onchange',function(){return $(this).attr('onchange').replace(/&Act=\d*/,'" + prms + "')})})</script>");

                //...

                //... other code

                //...

                base.BuildContents();

            }

Reply
  • +1 in reply to Paul C
    verified answer

    It appears that that code snippet didn't make it intact from the old CRM community site.  It should be:

            public override void BuildContents()

            {

                string prms = "&Act=432";

                prms += "&dotnetdll=" + ThisDotNetDll;

                prms += "&dotnetfunc=" + ThisDotNetFunction;

                prms += "&J=" + Dispatch.QueryField("J");

                prms += "&T=" + Dispatch.QueryField("T");

                AddHeaderContent(@"<script>$(function(){$('#SELECTUser').attr('onchange',function(){return $(this).attr('onchange').replace(/&Act=\d*/,'" + prms + "')})})</script>");

                //...

                //... other code

                //...

                base.BuildContents();

            }

Children
No Data