AL icon indicating copy to clipboard operation
AL copied to clipboard

[Question] How to add more group into native page.

Open hgnamvn opened this issue 9 years ago • 6 comments

Hi!

Please give me a syntax to add new group into a native page. If it isn't supported now, please let me know.

Example: I need to add more some fields into Table 79 Company Information. I need show these fields to Page "Company Information" with new group "Information For Reports". So how to do it.

pageextension 70000000 CompanyInformExt extends "Company Information" { CaptionML=ENU='Company Information Extension';
layout {
addbefore("System Indicator") { group(ReportInfor) { CaptionML=ENU='Report Information'; field("Name (VN)";"Name (VN)") { } field("Address (VN)";"Address (VN)") { } field("Address 2 (VN)";"Address 2 (VN)") { } }//End group }
} }

I build, publish and install OK. But when I open "Company Information" page, The Window Client show error and close App. The server "DynamicsNAV100" was unable to process the request. The application will close.

hgnamvn avatar Jul 03 '17 08:07 hgnamvn

Hope this helps: image

Result: image

waldo1001 avatar Jul 03 '17 10:07 waldo1001

Thank Waldo!

I tested your example. It run OK. But when I uninstall, unpublish the package, I extend TAB Company Information by adding more some fields to show on page. When I build, install package again, i get some errors. (sometime I get error 500 or unable install extension, or syn. ). I testing my case. I will notify the result later.

hgnamvn avatar Jul 04 '17 03:07 hgnamvn

Hi Waldo! This is step step by step I get the first error:

  1. I create a new package with your example. I build, publish, and install extension OK. I run page Company Information OK.
  2. I uninstall, unpublish that extension.
  3. Back Visual Studio tool. I create new al file to add more field ("Name VN") into TAB 79 Company Information. Modify Pageextension to replace "Home Page" field by my new field "Name VN".
  4. I build, publish, install the package again. But I get the error: image

hgnamvn avatar Jul 04 '17 04:07 hgnamvn

Hi Waldo,

I create another case. I only add more 1 field into Tabe 79 Company Information. I also can't install extension.

image

hgnamvn avatar Jul 04 '17 04:07 hgnamvn

First - you don't need to uninstall yourself - VSCode will replace the extension. Just press F5 to see the updated result.

Second - what can I say - I can't repro your scenario: image

So I guess it need to be something with your environment. May be you can try to rebuild it? Like: http://www.waldo.be/2017/07/04/nav-developer-preview-fix-script/

waldo1001 avatar Jul 04 '17 12:07 waldo1001

Thank Waldo,

I reinstall my environment on local server. My Case is OK now.

hgnamvn avatar Jul 11 '17 09:07 hgnamvn