XrmContext icon indicating copy to clipboard operation
XrmContext copied to clipboard

generate custom actions classes

Open mottibec opened this issue 6 years ago • 3 comments

somthing like Early Bound Generator has.

mottibec avatar Jun 21 '18 15:06 mottibec

If I understand the request, you would like XrmContext to generate strongly typed names for custom workflow actions?

If so then it is not a bad idea and we have a similar issue for XrmDefinitelyTyped

However, there is a problem with custom actions as Microsoft have decided to implement these in a very "interesting" way as the "unique name" of an action is not ensured to be the same across instances.

The unique name is composed of the prefix of the publisher who "created" the action in a given environment and the name that the creator gave. This means that if I have an action called "myaction" and is created in a a solution where the publisher has the prefix "xx_" then the action will have the name "xx_myaction". However, say that the action is deployed to a new environement in another solution with the publishing prefix "yy_", then that action will have the name "yy_myaction" instead in the new environment.

This should not stop us from doing it as it is op to the developer to ensure that the name is correct across environments.

TomMalow avatar Jun 25 '18 07:06 TomMalow

it looks like CrmSvcUtil is using the SdkMessage entity to generate actions, the SdkMessage name field contains the prefix of the publisher.

mottibec avatar Jun 25 '18 14:06 mottibec

@thygesteffensen - we need this one for CDSContext such we can trigger them with Daxif support :)

pksorensen avatar Jun 07 '20 10:06 pksorensen