2013 Microsoft Dynamics CRM-使用JS更改表单 [英] 2013 Microsoft Dynamics CRM - Change forms using JS

查看:119
本文介绍了2013 Microsoft Dynamics CRM-使用JS更改表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有多种形式的自定义实体.

I've got a custom entity that has multiple forms.

要创建新表单,可通过子网格来完成.用户只需单击子网格上的加号按钮.这将填充表单上的某些字段.我希望能够更改为特定形式,并将填充的数据传递到各个字段中.

To create a new form, this is done via a sub-grid. The user just clicks the plus button on the subgrid. This populates certain fields on the form. I want to be able to change to a specific form, and pass the data that is populated into the fields across.

当前,我已使用Xrm.Page.ui.formSelector库根据实体处于创建模式的时间在表单之间进行切换.我用它在表格之间切换:

Currently, I've used the Xrm.Page.ui.formSelector library to switch between forms based on when the entity is in create mode. I use this to switch between the forms:

   Xrm.Page.ui.formSelector.items.get("48faf3de-5b78-4ce9-a5f7-a01222e4e857").navigate()

如何传递更改表单时填充的数据?

How do I pass the data that is populated when the form is changed?

推荐答案

我的建议是保存记录,因此无需担心传递预填充的字段值.然后导航到所需的表单.

My recommendation is to save the record, so no need to worry about passing the prepopulated field values. Then navigate to the required form.

Xrm.Page.data.entity.save();
.
.
.
Xrm.Page.ui.formSelector.items.get(formId).navigate();

这篇关于2013 Microsoft Dynamics CRM-使用JS更改表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆