Page Extension show variable on list

CrunchCrunch Member Posts: 38
I'm trying to move some code from NAV2018 to a BC14 OnPrem extension.
On P46 Sales Order Subform there's an Item Variable, that we get OnAfterGetRecord. Item."Description 2" is then added as SourceExpr on the page.
How is this simple code supposed to work as a page extension?
Tried to create a function in the page extension object in AL, that returns Item."Description 2", and then add that as a field. This doesn't work.

Best Answer

  • CrunchCrunch Member Posts: 38
    Answer ✓
    I finally managed to show my field value from Item. The solution with a function as the sourceexp. actually worked all along. The problem was the control name was 15 chars. Reduced control name to 8 chars, and the column shows up with the correct value.

Answers

  • KlappspatenKlappspaten Member Posts: 22
    If I remember correctly you can't use functions, keys and fields from the base page (P46) in your page extension.

    A possible workaround could be that you create a new field "Description 2" in a table extension and show that field in the page extension.
  • CrunchCrunch Member Posts: 38
    edited 2019-09-30
    The Item variable is part of the customization.

    I tried using txt2al on a delta file, but this just results in //Unsupported feature: Code Modification on "OnAfterGetRecord".

    I've considered adding a flowfield, but would rather find a way to this more in line with the current (old) solution, as this is used quite often.
  • CrunchCrunch Member Posts: 38
    Answer ✓
    I finally managed to show my field value from Item. The solution with a function as the sourceexp. actually worked all along. The problem was the control name was 15 chars. Reduced control name to 8 chars, and the column shows up with the correct value.
Sign In or Register to comment.