Dynamics CRM4.0 菜單、工具列自訂

來源:互聯網
上載者:User

首先匯出設定檔:系統設定-->自訂-->匯出自訂項 匯出ISV配置(ISV.CONFIG)

<?xml version="1.0" encoding="utf-8"?><IsvConfig>  <configuration version="3.0.0000.0">    <Entities>      <!--對應的實體 name-實體名 -->      <Entity name="account">        <!-- 菜單  -->        <MenuBar>          <!-- Custom Menus that you may add -->        </MenuBar>        <!-- 工具列節  -->        <!-- ValidForCreate-建立時有效 ValidForUpdate-更新時有效 -->        <ToolBar ValidForCreate="0" ValidForUpdate="1">          <!-- 按鈕節 -->          <!-- Icon-按鈕表徵圖 PassParams-是否傳遞系統預設的幾個參數(typename,type,id,orgname,userlcid,orglcid) -->          <!-- WinMode-新視窗模式(0-window 1-Modal Dialog 2-Modeless Dialog)JavaScript-要執行的指令碼,一般為方法名 -->          <!-- WinParams-特殊參數 具體用法還沒研究 Url-開啟的頁面,一般和JavaScript參數選其一 -->          <Button Icon="/_imgs/ico_18_debug.gif" PassParams="1" WinParams="" WinMode="0" Url="" JavaScript="UpToHeadcompany();">            <Titles>              <Title LCID="2052" Text="我的按鈕" />            </Titles>            <ToolTips>              <ToolTip LCID="2052" Text="我的按鈕" />            </ToolTips>          </Button>        </ToolBar>        <!-- 左側導航 -->        <NavBar>          <NavBarItem Icon="/_imgs/ico_16_4.gif" Url="about:blank" Id="navItem">            <Titles>              <Title LCID="1033" Text="我的菜單" />            </Titles>          </NavBarItem>        </NavBar>        <!-- 列表頁相關 -->        <Grid>          <!-- 功能表列 -->          <MenuBar>            <Buttons>              <Button Icon="/_imgs/Tools/ico_contract_template.gif" JavaScript="alert(1);">                <Titles>                  <Title LCID="1033" Text="我的菜單" />                </Titles>                <ToolTips>                  <ToolTip LCID="1033" Text="我的菜單" />                </ToolTips>              </Button>            </Buttons>          </MenuBar>        </Grid>      </Entity>    </Entities>  </configuration>

按鈕的事件也可以表單的onload事件中動態綁定

for (var index in document.getElementsByTagName("LI")) {    if (document.getElementsByTagName("LI")[index].title == "我的按鈕") {        document.getElementsByTagName("LI")[index].onclick = MyEvent;        break;    }}

儲存檔案,再匯入自訂實體即可(系統設定--〉自訂--〉匯入自訂項,瀏覽--〉上傳--〉匯入所選自訂項)
重新整理頁面即可看到效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.