al-code-outline icon indicating copy to clipboard operation
al-code-outline copied to clipboard

Suggestion: Code Action Promote Action

Open mjmatthiesen opened this issue 1 year ago • 5 comments

Would be great if there was a code action on actions in a page that gave me the option to promote it, which would then create the action ref in the related group.

This might be too arduous when they category_process already exists, but a man can dream

mjmatthiesen avatar Sep 18 '24 23:09 mjmatthiesen

Isn't that what the built-in code action provided by Microsoft already does?

See: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-code-actions#code-actions-for-promoted-actions

Or do you mean something else?

rvanbekkum avatar Sep 19 '24 04:09 rvanbekkum

I am talking about net new actions, not the conversion. Outside of adding the old properties I can't find a way to activate the ms code action

mjmatthiesen avatar Sep 19 '24 04:09 mjmatthiesen

But wouldn't that work then? Add Promoted and PromotedCategory to the action(s) you'd like to promote and then invoke the Microsoft code action.

rvanbekkum avatar Sep 19 '24 05:09 rvanbekkum

Yes, the goal would just be to avoid that in the first place.

mjmatthiesen avatar Sep 19 '24 23:09 mjmatthiesen

@mjmatthiesen FYI, ALCodeActions does contain a 'Promote Action' quick action.

https://marketplace.visualstudio.com/items?itemName=davidfeldhoff.al-codeactions

https://github.com/DavidFeldhoff/al-codeactions/raw/HEAD/images/promoteAction.gif

fvet avatar Feb 24 '25 21:02 fvet