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