【发布时间】:2021-12-14 10:46:05
【问题描述】:
我在“Parcours”表单中添加了一个新按钮,该按钮将我带到另一个表单“问题”,并带有Xrm.Navigation.openForm
“问题”表单有一个来自“Parcours”的查找字段,我想从以前的表单中自动填充它,例如:
这是我的按钮代码,我想自动检测 parcours 的 ID 并将其设置在新的“问题”表单中
function NavigateQuestion(){
var entityFormOptions = {};
entityFormOptions["entityName"] = "zs_question";
var formParameters = {};
// Set lookup column
formParameters["zs_parcours"] = ""; // I want to put the ID here from the previous form.
formParameters["zs_parcoursname"] = ""; // Name of the parcours.
formParameters["zs_parcourstype"] = "zs_parcours"; // Table name.
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function (success) {
console.log(success);
console.log(formParameters);
},
function (error) {
console.log(error);
});
}
【问题讨论】:
标签: javascript dynamics-crm powerapps xrm