カスタム ワークフロー コードでモデル プロパティを作成し、コードのアセンブリを生成しました。その後、プラグイン登録ツールを使用してアセンブリ ファイルを登録するのにうんざりしましたが、完了時に次のようなエラー メッセージが表示されました。プロパティ モデルの型 Int32 はサポートされていません。(プラグイン登録ツールが64ビットのint型をサポートしている場合、下に貼り付けたコードからint32をint64に変更する方法)
未処理の例外: System.Web.Services.Protocols.SoapException: サーバーは要求を処理できませんでした。詳細:
0x8004501d
プロパティ モデルの型 Int32 はサポートされていません。PluginRegistrationTool の System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) の System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) のプラットフォーム。 PluginRegistrationTool.RegistrationHelper.RegisterPluginType(CrmOrganization 組織、CrmPlugin プラグイン) での CrmSdk.CrmService.Create(BusinessEntity エンティティ)、PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(オブジェクト送信者、EventArgs e) で
以下のコードを参照して、何か間違ったことをした場合は修正してください。
[CrmWorkflowActivity("Create Cardetails Record", "Utilities")]
public partial class CreateCardetails : SequenceActivity
{
public static DependencyProperty modelProperty = DependencyProperty.Register("model", typeof(int), typeof(CreateCardetails));
[CrmInput("Model")]
public int model
{
get
{
return (int)base.GetValue(modelProperty);
}
set
{
base.SetValue(modelProperty, value);
}
}
public CreateCardetails()
{
InitializeComponent();
}
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
{
// Get the context service.
IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService));
IWorkflowContext context = contextService.Context;
// Use the context service to create an instance of CrmService.
ICrmService crmService = context.CreateCrmService(true);
DynamicEntity entity = null;
Guid contactId;
if (context.InputParameters.Properties.Contains("Target") && context.InputParameters.Properties["Target"] is DynamicEntity)
{
// Obtain the target business entity from the input parmameters.
entity = (DynamicEntity)context.InputParameters.Properties["Target"];
contactId = ((Key)entity.Properties["contactid"]).Value;
Lookup lookup = new Lookup();
lookup.Value = contactId;
lookup.type = "contact";
//Create an account which is linked to the contact record
DynamicEntity cardetails = new DynamicEntity("cir_cardetails");
cardetails["cir_carsdetailsid"] = lookup;
//Setting the picklist value of Model
Picklist modelPickList = new Picklist();
modelPickList.Value = (int)model;
cardetails.Properties.Add(new PicklistProperty("cir_model", modelPickList));
Guid carkey = crmService.Create(cardetails);
}
return ActivityExecutionStatus.Closed;
}
}
親切に助けてください、私のすべての運は今なくなっています。修正方法がわかりませんし、問題についてもわかりません。