Closed fvet closed 3 years ago
Thank you for reporting your issue. I've fixed it and released a new version of the extension.
Thanks for the fix!
I wanted to add one more remark. I'm currently using the change-case extension for camelcasing.
Name: change-case
Id: wmaurer.change-case
Description: Quickly change the case (camelCase, CONSTANT_CASE, snake_case, etc) of the current selection or current word
Version: 1.0.0
Publisher: wmaurer
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case
With this extension, I get better names - in my opinion - than currently proposed by al-code-outline.
Same examples:
field(allowlowerclassonputaway; Rec."Allow lower class on put-away") > should be allowLowerClassOnPutAway
field(billOfMaterialsexists; Rec."Bill Of Materials exists") > should be billOfMaterialsExists
field(eDICode; Rec."EDI Code") > should be ediCode
field(eORINumber; Rec."EORI Number") > should be eoriNumber
field(aDRClassiffCode; Rec."ADR-Classiff.Code") > should be adrClassiffCode
And what would be the community guideline towards including field captions on custom API pages? Not sure how the API consumer would use the captions anyway...
Business Central uses the normal field captions (not the camel-cased field names)
Docs samples mentions normal field captions as well https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-develop-custom-api
We currently used the field captions, but with locked = true. (to avoid translation hell for APIs)
Maybe worth adding a setting to define how API field captions should be inserted?
Hi
I've modified this area and released new version of the extension. The page api fields will contain now table field captions instead of api field names to work the same way as Microsoft API v2.0 pages. There is a still posibility to use old Microsoft API v1.0 approach with api field names as captions with Locked property. To do this, you have to switch alOutline.useTableFieldCaptionsInApiFields
vs code setting to false.
I've also changed the way in which api field names are generated from table field names.
You can compare original Microsoft APIs here:
When I create a page of type
API
via theNew AL File wizard
, the fields inserted on the new page receive the following settings:Resulting file
If I add fields via the code action
Add Multiple Fields
, I get the following result