我正在嘗試編寫一個(gè) Dynamics 365 CRM 插件,我想在其中創(chuàng)建一個(gè)新的“銷售訂單”。我有以下代碼:using System;using System.Collections.Generic;using System.Linq;using System.ServiceModel;using System.Text;using System.Threading.Tasks;// Microsoft Dynamics CRM namespace(s)using Microsoft.Xrm.Sdk;using Microsoft.Xrm.Sdk.Query;namespace Microsoft.Crm.Sdk.Samples{ public class OrderTest : IPlugin { public void Execute(IServiceProvider serviceProvider) { ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); // Obtain the execution context from the service provider. Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext) serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext)); // The InputParameters collection contains all the data passed in the message request. if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity) { // Obtain the target entity from the input parameters. Entity entity = (Entity)context.InputParameters["Target"]; if (entity.LogicalName != "salesorder") return;我的問題是它無法創(chuàng)建銷售訂單。我得到的錯(cuò)誤消息是無用的。它說:Download the details and load with Plug-in Profiler.后跟一個(gè)長(zhǎng)標(biāo)記。我不明白如何創(chuàng)建“銷售訂單”以及如何獲得更容易理解的錯(cuò)誤消息。
在 Dynamics 365 中正確創(chuàng)建 SalesOrder
慕尼黑8549860
2021-07-15 18:05:35