如何在客户端动态填充查找字段 [英] How to populate lookup field dynamically in client side

查看:48
本文介绍了如何在客户端动态填充查找字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Dynamics crm 2016,我的任务是在客户端(无插件)中复制一条记录,因此使用onload事件,我正在调用一个函数,该函数获取具有我所有属性的对象(要复制到.).),则可以只填写表单中的所有字段(查找字段除外).我的数据中有3个值可供使用:名称:字段中显示的数据值:实体引用的GUID和多个类型.要填充查找字段,我需要ID和类型的实体名称.***代码需要是通用的出现两个问题:

I'm using dynamics crm 2016, my mission is to copy a record in client side (no plugins) so using onload event I'm calling a function that fetching an object with all my attributes(to be copy to..), I can fill simply all fields in my form except from lookup field. I have in my data from my fetch 3 values to use: name: the data shown in the field' value: the guid of the entity reference and a number of type.. To populate a lookup field I need the name of the entity the id and type. ***THE code needs to be generic Two questions rise up:

1 .如果是,那么类型值可用于填充实体类型字段吗?
2 .我可以像在旧字段中一样填充新字段中的name属性吗?

1.Is the type value usable to populate the entity type field if yes then how?
2.Can I populate the name attribute in the new field as is from the old field?

我得到的数据示例:

Attributes
:
name
:
"this is the name"
type
:
"10026"  -- Can I get the entity name (Account,Contact etc...) according to this val?
__proto__
:
Object
Value
:
"{6BddfDC-8B10-47F4-BC49-A537d2E43E}"

推荐答案

如果您的需求对我来说没有代码(插件),那么使用JavaScript来实现相同目的似乎有点作弊.

If your requirement is no code (plugins) to me it seems a bit of a cheat to use JavaScript to achieve the same.

您应该调查使用CRM工作流程可以完成多少工作,使解决方案可以由职能支持人员而不是技术人员来支持.

You should investigate how much of this could be done using a CRM Workflow, making a solution that would be supportable by a functional support person rather than a technical.

然后您可以选择使用JavaScript触发工作流程

You could then optionally trigger the workflow using JavaScript

这篇关于如何在客户端动态填充查找字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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