DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Use long variable name instead of Rec as parameter name when creating procedures #79

Closed wbrakowski closed 3 years ago

wbrakowski commented 4 years ago

Hi David,

when I create a procedure from a page or table where I have an implicit "Rec", I sometimes want to pass this variable into a new procedure. For example in this PageAction I would like to create the new procedure "CreateOrderFromWebshopOrder".

image

The new procedure will have a parameter "Rec: Record "Webshop Sales Header WEB11 CCO".

image

Would it be possible to automatically rename this parameter Rec by using the object name? Instead of "Rec: Record "Webshop Sales Header WEB11 CCO"---- ...this? WebshopSalesHeader: Record "Webshop Sales Header WEB11 CCO"

image

Basically by using the same functionality that is already implemented in the AL Variable Helper when you create a new record:

image

But maybe I am the only one who would like to have that :-D

DavidFeldhoff commented 4 years ago

Hi Waldemar, thanks for reaching out. I think I have a few other requests which I would add before this one, but I'll have it in mind. I already thought about adding a dependency to that extension (vFull, vShort, and so on). So maybe I'm implementing it with that one as well.. :)

DavidFeldhoff commented 3 years ago

Hi Waldemar, I just looked at this issue again and I'm unsure if I should implement it. Maybe it's important if I hand it over to a method (Rec, xRec) if that variable is the current Record or not. If you do not necessarily insist, I would leave it like it is at first, would that be okay? If more people would like to have that, I'd think about it again.

wbrakowski commented 3 years ago

That's fine for me :-)