In this blog post, we want to show how you can link your help or documentation to your app/s in Business Central. The goal of this blog is to implement your help so when users press CTRL+F1 on one of your app pages, they will be redirected to your product help/documentation.
Microsoft describes the required configuration in their DOCS under Configure Context-Sensitive Help.
Basically, the help link generated by CTRL+F1 on a page is composed of three components.
contextSensitiveHelpUrl: This is the main URL of your online help. It can be specified like in the example above. However, other combinations might also be possible e.g. https://{0}.mydocs.com/documentation/ Please note that the {0} in the main URL will be replaced by a locale value (language code).
supportedLocales: {0} will be replaced in the generated help link with the user language in Business Central (e.g. en-US, de-DE, fr-FR, etc.)
ContextSensitiveHelpPage: This is the last component of the help link and the most important one. It is taken from the individual page/page extension and controls the redirection of the user in your help.
Configure contextSensitiveHelpUrl and supportedLocales
The components “contextSensitiveHelpUrl” and “supportedLocales” are defined in your “app.json” file of your app. To define the contextsensitive help, proceed as follows:
Open your app in your editor.
Open the “app.json” file in the root.
In the “app.json” file, change the value of “contextSensitiveHelpUrl” [add if not present - intellisense helps ;)]:
"contextSensitiveHelpUrl": "http://mydocs.com/{0}/documentation/",
In the “app.json” file, change the value of “supportedLocales” [add if not present - intellisense helps ;)] or add the language pairs (translations) of the documentations:
"supportedLocales": ["en-US", "de-DE"],
Info | Please always use the locale codes supported by Microsoft, click here to find a list of the supported languages in Business Central: Country/region availability and supported languages - Business Central | Microsoft Docs. |
Your app.json file should look similiar to this now:
Configure ContextSensitiveHelpPage
Next thing to do is to configure “ContextSensitiveHelpPage” in your pages and page extensions. To do this, proceed as follows:
Open the page (page.al) or page extension (pageExt.al) and add the following code (replace “your-help-file” with the corresponding help file name...):
ContextSensitiveHelpPage = 'your-help-file.html';
Please note that you have to define “ContextSensitiveHelpPage” and the value for this for every page and page extension. It is possible to use the same value on multiple pages or page extensions. If you don't have a full guide for your product or if it's still in development you might just refer to the start page of your documentation ... maybe like this:
ContextSensitiveHelpPage = 'index.html';
Once the development is ready you can then search for “index.html” and enter the correct help links.
If you need help with the setup of your own DOCS/an online help or have questions regarding the context-sensitive help, write an email or send a PM.
Best regards,
Jannic
Comentários