[英]Using Xrm.Utility.openEntityForm() to override fields in different record
I am currently utilizing Xrm.Utility.openEntityForm to pass field values to a different record in crm. 我目前正在使用Xrm.Utility.openEntityForm将字段值传递给crm中的其他记录。
I want to be able to overwrite the existing field values in the destination record with the parameter values I send with the method. 我希望能够用我通过该方法发送的参数值覆盖目标记录中的现有字段值。
My current code line looks like this: 我当前的代码行如下所示:
Xrm.Utility.openEntityForm("account", GUID, parameters);
The GUID is obtained through a lookup field in the current form, as well as the parameters. GUID是通过当前形式的查找字段以及参数获得的。
The code currently navigates to the specified record based on the GUID and writes the parameters to only the empty fields. 该代码当前基于GUID导航到指定的记录,并将参数仅写入空白字段。 Non empty fields are not affected by this. 非空字段不受此影响。
I understand that the current approach may not be the best option for working with existing records. 我了解当前的方法可能不是处理现有记录的最佳选择。 I want to be able to overwrite existing fields; 我希望能够覆盖现有字段; am I going in the right direction? 我朝着正确的方向前进吗?
There are some points to be considered while we are trying to set values using OpenEntityForm like values passed cant be script, values passed must be valid as per the data type and so on. 在尝试使用OpenEntityForm设置值时,需要考虑一些要点,例如传递的值不能是脚本,传递的值必须根据数据类型有效,依此类推。 MSDN documentation here has some more details on this. 此处的 MSDN文档中对此有更多详细信息。 Hope this guides you closer to solving the issue. 希望这可以指导您进一步解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.