Dynamic CRM 2013 Learning notes (23) CRM JS Smart Tips (CRM-related methods, properties, and Page fields), and pre-release debugging

Source: Internet
Author: User

We know in the CRM JS file quoted Xrmpagetemplate.js, you can implement smart hints, but each JS file is too cumbersome to refer to, in fact, you can use the function of the VS to each JS file automatically realize the smart prompt CRM JS;

In addition, we debug JS, the release JS file is also more cumbersome things, the best way is all tuned, and then released, this article introduced with Firefox + Firebug + frame can be easily debug CRM js, all tuned, then upload JS, obviously can speed up the development of speed.

1. Smart Tips

    • CRM-related method Properties vs. plus Xrmpagetemplate.js:

Http://yunpan.cn/cyy2BDaXnhQcC Extract Code E7f7

So we do not have to add this reference in each JS, directly can be a hint:

    • Smart Tips for page fields

First get all the field information on the page:

Then, all the field information on the left side of the copy is put into the variable for easy development, and the Init method is dynamically initialized when the page loads when it is actually published:

var page = {};
var pageattr = {};
Note the following 2 lines before posting
var  page = {date: {}, AccountId: {}, CurrencyID: {}, Goods_ return: {}, Amount: {}, Approval_status: {}, Name: {}, CreatedBy: {}, ownerID: {}, Footer_statecode: {}, Creditnoteitem: { }, Ai: {}, Expense_item: {}}; 
var  pageattr = {date: {}, AccountId: {}, CurrencyID: {}, Goods_return: {}, Amount: {}, Approval_status: {}, Name: {}, CreatedBy: {}, ownerID: {}, Footer_statecode: {}, Creditnotei TEM: {}, Ai: {}, Expense_item: {}}; 
function init () {
    var carrs = Xrm.Page.getControl ();
     for (var i = 0; i < carrs.length; i++) {
        var col = carrs[i];
        var name = Col.getname (). Replace ("New_""" ");
        Page[name] = col;
        if ' Subgrid ')
            Pageattr[name] = Col.getattribute ();
    }
    Note the following 5 lines before posting
    var ";
     for (var in page) {
        ":{},");
    }
    Console.log (TXT);
}

Then you can point out the fields:

2. Commissioning

    • Firefox + Firebug + fireframe

Click Attach to frame, then click on the page to navigate to the specific frame

    • Alternatively, you can use the following plug-in, directly in the drop-down box to select frame:

Http://www.cnblogs.com/ziyunfei/archive/2012/12/13/2815543.html

This way we can debug the CRM JS in different frame.


Dynamic CRM 2013 Learning Notes Series Rollup



Dynamic CRM 2013 Learning notes (23) CRM JS Smart Tips (CRM-related methods, properties, and Page fields), and pre-release debugging

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.