我已經嘗試設置參數爲:動態CRM 2011傳遞數組作爲參數
array("item1","item2","item3")
,也可以作爲:
new array("item1","item2","item3")
,也可以作爲:
var Labels = new array("item1","item2","item3")
但我看不到m將數組傳遞給以下函數:
function BoldLabel(Labels) {
var length = Labels.length;
var element = null;
for (var i = 0; i < length; i++) {
element = Labels[i];
document.getElementById(element).style.fontWeight="bolder";
document.getElementById(element).style.fontSize="13px";
}
}
我不斷收到「數組未定義」錯誤。我確信我看到這個地方完成了,但卻找不到這個例子。問題是,我希望能夠重複使用此代碼,所以只是路過我想大膽的項目組成的數組會比切削更容易和代碼粘貼到一個新的功能,並在每個標籤名稱分別寫像
document.getElementById("new_pricingsubtotal_c").style.fontWeight="bolder";
document.getElementById("new_pricingsubtotal_c").style.fontSize="13px";
document.getElementById("new_pricingsubtotal1_c").style.fontWeight="bolder";
document.getElementById("new_pricingsubtotal1_c").style.fontSize="13px";
document.getElementById("new_lineitemtotal_c").style.fontWeight="bolder";
document.getElementById("new_lineitemtotal_c").style.fontSize="13px";
document.getElementById("new_trucktotalcost_c").style.fontWeight="bolder";
document.getElementById("new_trucktotalcost_c").style.fontSize="13px";
任何幫助,將不勝感激!
作爲一方,您確實知道這種定製不受支持,並且不能保證能夠跨瀏覽器或將來的CRM彙總。相關閱讀:http://stackoverflow.com/questions/15742740/how-to-expand-a-text-field-in-order-to-remove-scrolling-by-using-javascript/15761475?noredirect=1#comment22404941_15761475 –
我完全理解,但微軟的這種強迫我們的手並沒有給我們通過Xrm框架來實現的方式。我們是UR12的內部部署部署,所以我們只需慢慢從我們這裏獲取更新,並確保它不會破壞任何內容。如果它確實或有能力,那麼我們將不得不改變代碼。我希望他們能夠在未來實現這一能力,然後我們修改我們的代碼並離開我們。在此之前,我們的選擇是使用oData調用等將整個表單重寫爲網絡資源,以便按照我們想要的方式進行格式化。 – JustinCredible
聽起來像一個明智的態度,它只是重要的是要知道什麼樣的未來變化可能會做你現有的工作,例如你見過北極星的形式嗎?他們完全不同。 –