简体   繁体   English

CRM 2011如何使用Java来使用子/相关实体表单中的值更新父实体字段

[英]CRM 2011 how to update a Parent entity field with values from a child/related entity form using Javascript

I am fairly new to CRM and I am using CRM Dynamics 2011. I am trying to read values from an Activity and populate the values into a Lead form when the Activity is saved. 我对CRM相当陌生,并且正在使用CRM Dynamics2011。我试图从活动中读取值,并在保存活动时将这些值填充到销售线索表单中。 The scenario is that , on the Lead form there is a section which holds an Activity, so when I create a new Activity(phone-call,sms,email etc), I want to read the createdon date of that particular activity and set the value to a date field on the parent Lead form. 场景是,在Lead窗体上有一个保存Activity的部分,因此当我创建一个新的Activity(电话,短信,电子邮件等)时,我想读取该特定活动的createdon日期并设置父潜在客户表单上日期字段的值。 What I have gathered is that I will write a JavaScript function on the Activity , what I am battling to understand is how to write the values of the Activity to the Lead as this function will be OnSave event of an Activity, how do I write those values across to the Parent Lead, Any ideas I would appreciate any help or guidance. 我所收集的是,我将在Activity上编写一个JavaScript函数,我要努力理解的是如何将Activity的值写入Lead,因为此函数将是Activity的OnSave事件,我该如何编写这些家长领导的价值观,任何想法,我将不胜感激。

You shouldn't need to do JavaScript for this. 您无需为此执行JavaScript。 Create a Workflow against the Activity record (you'll need to be more specific about the type of activity) and create a Workflow like so:- 针对“活动”记录创建一个工作流(您需要更详细地说明活动的类型),并按照以下方式创建一个工作流:- 在此处输入图片说明

You can then set the required field on the parent from the values on the activity. 然后,您可以根据活动中的值在父项上设置必填字段。

在此处输入图片说明

You can do it via JavaScript however you shouldn't need to unless you have more complex requirements. 您可以通过JavaScript进行操作,但是除非您有更复杂的要求,否则不需要这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM