Connection reports in the left-side Navigation Pane of accounts in Microsoft Dynamics CRM

Source: Internet
Author: User
Tags microsoft dynamics

In Microsoft Dynamics CRM 4.0, the buttons in the left navigation bar in the account entity cannot write JavaScript Functions in isV. Therefore, if you want to connect a report that requires parameter passing, there is a problem.

I want to write a code segment in onload in the account to change this situation.

1. Write the following code in onload in the account.

View Source

Print?

01 var CRM_FORM_TYPE_CREATE = 1;
02 var CRM_FORM_TYPE_UPDATE = 2;
03 var navId="navTransactionsItem"
04 if(crmForm.FormType ==CRM_FORM_TYPE_CREATE)
05 {
06    //debugger;
07     displayLeftNavItem('Customer transaction information', false);
08 }
09 else if(crmForm.FormType == CRM_FORM_TYPE_UPDATE )
10 {
11     if(document.getElementById(navId) != null)
12    {
13       var navElement = document.getElementById(navId);
14       if(navElement!=null )
15       {
16                var accountcode = crmForm.all.accountnumber.DataValue;
17                //debugger;
18                if(accountcode!=null)
19                {
20                    var url=
21 'https://crmtest.msfunds.com.cn/ReportServer/Pages/ReportViewer.aspx?%2fMSHF-DEV_MSCRM%2f%e5%ae%a2%e6%88%b7%e4%ba%a4%e6%98%93%e6%b5%81%e6%b0%b4&rs:Command=Render&CUSTID='+accountcode;
22                     navElement.onclick = function LoadAreaOverride() {
23                         openIsvWin(url, false, -1, '')
24                     }
25               }
26               else
27              {
28                      setLeftNavItemState('Customer transaction information', true);
29               }
30       }
31    }
32 }

Note: The JavaScript function openisvwin is a global function specific to CRM 4.0 and is available anywhere. It enables the report to be loaded when you click the button in the left column, the setleftnavitemstate displayleftnavitem functions are defined by myself to show the hidden and enable the left sidebar buttons.

Effect

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.