0
我在事件表單中添加了子網格,它顯示了具有相同事件分類的知識庫文章。創建記錄時設置子網格
當我打開一個現有的事件時,它工作的很好,但它在創建新事件時不起作用。
在子格是「啓用此內容,保存記錄」
我希望當記錄相關的這種行爲,但我做一個查詢和設置子格。
因此,我的要求是在創建事件時啓用並能夠設置子網格,然後保存它。
更多的是,當保存記錄失敗,因爲一個插件停止它時,子網格工作正常,當分類改變,而不是被保存的事件。
function Form_OnLoad() {
...
if (formType == "1") { ...}
else
{
//Check if there is/are article(s) with the same subject of the case
check_articles();
}
function check_articles()
{
var KBArtGrid = document.getElementById('grid_kb_articles');
if (KBArtGrid == null) { //make sure the grid has loaded
setTimeout(function() { check_articles(); }, 500); //if the grid hasn’t loaded run this again when it has
return;
}
var classificationValue = new Array();
classificationValue = Xrm.Page.getAttribute("subjectid").getValue();
if(classificationValue != null && classificationValue[0] != null) {
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
" <entity name='kbarticle'>" +
" <attribute name='number' />" +
" <attribute name='title' />" +
" <attribute name='statecode' />" +
" <attribute name='kbarticletemplateid' />" +
" <order attribute='number' descending='false' />" +
" <filter type='and'>" +
" <condition attribute='subjectidname' operator='like' value='" + '%' +classificationValue[0].name +'%'+ "' />" +
" </filter>" +
" </entity>" +
" </fetch>";
KBArtGrid.control.SetParameter("fetchXml", fetchXml);
KBArtGrid.control.Refresh();
問題是「我想在創建新事件時啓用子網格」?答覆是「你無法支持自定義設置」。也許有一種不支持的方式,但請在你的問題中解釋你的要求:) –
你可以使用一個html web資源列出知識庫文章。 – Bvrce
我想將它放在一個子網格中,我沒有看到它的網頁設計。 – Jorge