crs-al-language-extension icon indicating copy to clipboard operation
crs-al-language-extension copied to clipboard

Exclude Object Names from Rename

Open elweilando opened this issue 4 years ago • 6 comments

Is it possible to define a list of object names in workspace, which are excluded from renaming?

We have in a cloud instance some tables and tableextensions with wrong or missing suffixes in objectname . Because of cloud, renaming these objects is not possible.

Every time we work on these objects we have to configure the CRS.OnSaveAlFileAction before we save the files.

It's more comfortable to define a list of objects, which are excluded from renaming.

elweilando avatar Jun 07 '20 15:06 elweilando

I can do that .. but you could easily create a new table, an upgrade codeunit, make the objects obsolete, and get rid of the problem once and for all? Wouldn't that be more convenient?

waldo1001 avatar Jun 08 '20 08:06 waldo1001

That would be the righter way. But excluding the objects is in this case an absolute acceptable fix and takes less time than the refactoring.

elweilando avatar Jun 08 '20 12:06 elweilando

Also, to add on to this, it's adding Quotations around my <ObjectName> to become "<ObjectName>" that weren't there before.

Ji-Peter avatar Jun 16 '22 18:06 Ji-Peter

Hi, I also have troubles when obsoleting. I obsolete some fields & actions because of their name was missing suffix. I use reorganize on file save, so each time I save the obsolete field gets suffix added to it. And then analyzer complains because I renamed field that was in previous version.

I would like to have a way to mark only places where object renaming should not happen. Something like this:

    //#crs rename disable
    field(123; "PREF My Field"; Date) { ObsoleteState = Pending; ObsoleteReason = 'Removed. Use field "PREF My Field SUFF"'; }
    //#crs rename restore
    field(124; "My Field"; Date) {}

After saving I should get:

    //#crs rename disable
    field(123; "PREF My Field"; Date) { ObsoleteState = Pending; ObsoleteReason = 'Removed. Use field "PREF My Field SUFF"'; }
    //#crs rename restore
    field(124; "PREF My Field SUFF"; Date) {}

Same thing with objects, extensions & actions.

Thanks.

ernestasjuska avatar Aug 30 '22 11:08 ernestasjuska

Try to use:

  //crs-al disable
  ...
  //crs-al enable

waldo1001 avatar Aug 30 '22 11:08 waldo1001

Thanks. That was exactly what I need. :)

ernestasjuska avatar Aug 30 '22 11:08 ernestasjuska