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

Renaming doesn't remove underscore #161

Closed
CNAEvidi opened this issue Apr 7, 2020 · 5 comments
Closed

Renaming doesn't remove underscore #161

CNAEvidi opened this issue Apr 7, 2020 · 5 comments

Comments

@CNAEvidi
Copy link

CNAEvidi commented Apr 7, 2020

With AL 5 underscore in filenames are no longer allowed

Can you modify navobject.ts line 264+265 to
this.objectName = this.objectName.trim().toString().replace(/["]/g, '');
this.extendedObjectName = this.extendedObjectName.trim().toString().replace(/["
]/g, '');

Regards
Christoffer

@waldo1001
Copy link
Owner

I think you meant:

this.objectName = this.objectName.trim().toString().replace(/["_]/g, '');
this.extendedObjectName = this.extendedObjectName.trim().toString().replace(/["_]/g, '');

I was a bit confused, but the "_" got removed from your message :-).

@CNAEvidi
Copy link
Author

CNAEvidi commented Apr 27, 2020 via email

@benjaminknapper
Copy link

I am unable to find documentation that outlines underscore as a forbidden character in AL file names.
Currently CRS v1.2.2 seems to me to operate in an interesting fashion as listed below.

I have extensions:
AL Language v5.0.254558
waldo's CRS AL Language Extension v1.2.2

Settings:
CRS: Object Name Prefix = XX_
CRS: On Save Al File Action = Rename

Original file name:
Pag46-Ext50131.XX_SalesOrderSubform.al

New file name upon saving:
Pag46-Ext50131.XX_XXSalesOrderSubform.al

Object header:
pageextension 50131 "XX_SalesOrderSubform" extends "Sales Order Subform" //46

So my two questions are:

  1. @CNAPilaro or @waldo1001 can you point me towards the documentation that outlines underscore as a forbidden character in AL file names? I want to be able to justify the work this will require to remove the underscores we have appended as our prefix.
  2. Regardless of the validity of the underscore character in files names. @waldo1001 is the above the desired effect of the rename function for files that already exist and have been using your extension?

@waldo1001
Copy link
Owner

it is not the desired effect - just a consequence of me removing underscores.
I'm doing a build now that fixes it, and that introduces a setting where you can control it however you want.

about documentation: I haven't. but the Code Analysis indicate it
image

@benjaminknapper
Copy link

I appreciate the speedy response. I also wanted to note that after I posted my comment I found Issue #169 and wanted to put that here!

You're the best!

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

No branches or pull requests

3 participants