Okay, let's trace our steps. You've just dragged a new UpdateResourceActivity onto your custom workflow.
Now, you want to bind the (single-valued) ResourceId property to a new field. In the Properties window in Visual Studio, you click on the ResourceId property, and then click on the elipsis button.
Now you see a dialog in which you choose an existing field/property or create a new one. In my earlier blog post, I instructed you to create a new field named "TargetId".
So far, so good. Next, you want to bind the (multi-valued) UpdateParameters property to a new field. You click on the UpdateParameters property and click on the elipsis again.
Wait, what's this? You don't see the same dialog that you saw for the single-valued property.
How do you bind the property in the same way you did with the single-valued property with this dialog? The answer is: you don't. If you were to attempt to do the same by clicking the Add button, what you're actually doing is assigning the UpdateParameters in the designer-generated code, which isn't where we want to do it. We want to assign the UpdateParameters from our code activity.
Cancel out of the dialog and, instead of clicking on the elipsis, click on the "Bind Property..." link below.
Now you see the appropriate dialog, and you can create a new field named "MyUpdateParameters" to which you'll bind this property.
Sometimes Visual Studio will disable the "Bind Property..." link when it's not supposed to. This can make things especially confusing. I was able to get Visual Studio to re-enable the link with the following steps:
- Click on the elipsis for the multi-valued property.
- In the Collection Editor dialog, click Add and then Remove.
- Click OK to close the dialog.
//--- Add the account name to the update parameters.
updateResourceActivity1.UpdateParameters = new UpdateRequestParameter[]
{
new UpdateRequestParameter("AccountName",
UpdateMode.Modify, accountName)
};
Incredible article distributed here by you. I have long been eager to adapt new things in relation to this topic, and there is no doubt that I have adapted new things today.Hotel Broker in Kansas
ReplyDelete