Dynamics 365 Business Central uses Extensions V2 (All previous versions must be upgraded to v2 to work on Business central)
Events
https://community.dynamics.com/nav/b/navision360/archive/2017/11/13/introduction-to-events-in-microsoft-dynamics-navExtensions
- Download Business Central On-Premise from Partnersource
- Install Business Central On-Premise
- Import developer license
- Import-NAVServerLicense BC160 -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte))
- Enable Developer Service
- Business Central Administration>Development>Tick Enable Developer Service Endpoint
- Ensure windows user is setup as Super in Company
- Download and install Visual Studio Code
- https://code.visualstudio.com/
- Click Extensions (Last icon on the top left list, square icon)
- Search for AL
- Select AL Language>Install
- Restart VB Code
- View>Command Palette>AL:Go!
- Select Path to store solution
- Select Launch.json
- Change "name" from Your own server to server instance name ("BC130")
- Change "server" to true address path ("http://localhost:8080")
- Add "port" = 7049
- Authentication = "Windows"
- Enable download Symbols
- View>Command Palette> AL:Download Symbols
- Add TranlsationFile
- in app.json
- Change line "runtime": "2.3"
- to "runtime": "2.1"
- After this line,
- Add line
- ,"features": ["TranslationFile"]
- save
- Publish Extension to environment
- F5 or AL:Publish
- Resolve NetFx40_LegacySecurityPolicy error
- C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service
- Edit Microsoft.Dynamics.Nav.Server.exe.config in notepad as administrator
- Find <NetFx40_LegacySecurityPolicy enabled="true" />
- change to <NetFx40_LegacySecurityPolicy enabled="false" />
- Restart nav service
- Web client opens with published extension
- If you try to publish again, you may get the error "cannot synchronize because a newer version is already synchronized"
- Run this in the admin shell to remove it completely even after uninstalling and unpublishing
- https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-unpublish-and-uninstall-extension-v2
- Sync-NAVApp -ServerInstance BC130 -Name 'Hello World' -Mode Clean
Sample working launch.json
{
"version": "1.0.0.1",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "BC130",
"server": "http://mypc:8080",
"serverInstance": "BC130",
"port": 7049,
"authentication": "Windows",
"startupObjectId": 22,
"startupObjectType": "Page",
"breakOnError": true
}
]
}
No comments:
Post a Comment