Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to register images for plug-in steps for bulk messages (CreateMultiple/UpdateMultiple) #486

Open
simon-tooley-t4a opened this issue Jul 30, 2024 · 2 comments

Comments

@simon-tooley-t4a
Copy link

An exception is generated when attempting to sparkle a plug-in containing an image that has been configured for a bulk message, i.e. CreateMultiple or UpdateMultiple.

The exception is: 'Message property name 'Target' is not valid on message UpdateMultiple.'

@simon-tooley-t4a
Copy link
Author

On investigation I've found that the issue exists within the RegisterImage method of the PluginRegistration.cs.

`
switch (stepAttribute.Message)
{
case "Create":
image.MessagePropertyName = "Id";
break;

            case "SetState":
            case "SetStateDynamicEntity":
                image.MessagePropertyName = "EntityMoniker";
                break;

            case "Send":
            case "DeliverIncoming":
            case "DeliverPromote":
                image.MessagePropertyName = "EmailId";
                break;

            default:
                image.MessagePropertyName = "Target";
                break;
        }

`

Making the following change to the switch statement would appear to fix the issue:

default: image.MessagePropertyName = (stepAttribute.Message.ToLower() == "createmultiple" || stepAttribute.Message.ToLower() == "updatemultiple") ? "Targets" : "Target"; break;

@simon-tooley-t4a
Copy link
Author

Discovered that CreateMultiple requires the property name of Ids rather than target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant