Dynamics CRM Onlineのプラグインを作成する必要があります。連絡先のフィールドを編集した後、会社名をランダムに変更します。 私はparentcustomeridフィールドを変更する必要があると知っていますが、私はすべての顧客IDを取得し、プラグインのコードでそれらのいずれかを割り当てる方法を知らない。Dynamics CRMの変更会社のプラグイン
マイコード:
public class ContactPlugin: IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
{
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName == "contact")
{
//entity.Attributes.Add("parentcustomerid", GetNewParentCustomerId());
}
}
}
}
私はそれをどのように行うことができますか?
は私が望んでいた、助けてくれてありがとう。 – AlxZahar