Hi experts,
I'm facing difficulties when converting Web Page Viewer Add-in from CAL to AL.
I had converted the Control Add-in in NAV 2018 to usercontrol in AL, however I have no clue on how to making functions of the Control Add-in avaialble in AL.
Seeking help on whoever able to enlighten me how to migrate below into AL.
Thank you very much.
Thanks for your reply, it seems like I have to find another workaround.
[Update]
Manage to use Table 9500 Email Item and standard functions in this table to call out the page for sending email.
Thank you for all the advice.
Sorry , i think dotnet in AL only available in BC and not backported to NAV 2018. For this case I think you cannot convert this and better if you call standard Email Dialog Page (Page ID 9700)
Hi I Gusti Made Ari Permadi,
Many thanks for your reply.
I had tried the method that you propose but it doesn't seem to work on NAV 2018.
I created the AL file as advice but encounter an error.
"Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, codeunit, report, xmlport, query, controladdin)"
I'm currently on NAV 2018 with AL Language 0.13.91787.
Seek your kind advise.
you need to declare the Web Page Viewer as the dot net first :
dotnet { assembly("Microsoft.Dynamics.Nav.Client.WebPageViewer") { Culture = 'neutral'; type("Microsoft.Dynamics.Nav.Client.WebPageViewer.IWebPageViewer"; WebPageViewer) { IsControlAddIn = true; } } }
Above will be in single file , let say dotnet.al
Then use it on your page like below :
layout { usercontrol(WebPageViewer; WebPageViewer) { ApplicationArea = All; trigger ControlAddInReady(callbackUrl: Text) begin CurrPage.WebPageViewer.LinksOpenInNewWindow(); CurrPage.WebPageViewer.SetContent(BodyText); end; trigger DocumentReady() begin end; trigger Callback(data: Text) begin end; trigger Refresh(callbackUrl: Text) begin CurrPage.WebPageViewer.LinksOpenInNewWindow(); CurrPage.WebPageViewer.SetContent(BodyText); end; } }
Above will be in your Page Extension file
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148