Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

how to create new page USING VS CODE in ms dynamics 365 bc ?

(0) ShareShare
ReportReport
Posted on by 339

Hello all

how to create new page in ms dynamics 365 bc ?i want create new page like below screenshot file ,could you please share me vs code here for this (screenshot)that will helpful for me

cutbackrocess.PNG

Batch Name:

A Cutback batch can be setup that allows the user to setup section parameters in advance, the user can select an existing batch or create a new on. If the user selects a new batch, the following screen will be presented:

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: how to create new page USING VS CODE in ms dynamics 365 bc ?

    Your problem here is fixed if you set the TableRelation on your batch field.

    Regarding the TXT question, if you need that you need to create a local development sandbox environment based on Docker.

    Simple way is to create a VM on Azure with all installed by going to http://aka.ms/bcsandbox.

    From this machine, you have CSIDE and you can export objects in TXT and convert them by using TXT2AL tool.

  • SABIH Profile Picture
    339 on at
    RE: how to create new page USING VS CODE in ms dynamics 365 bc ?

    Hello Stefano Demiliani,

    how to export as TXT a similar page from a D365BC local sandbox (C/AL) ?could you please show me as screenshot especially in dynamics 365 bc cloud

    i dont know how to do this

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: how to create new page USING VS CODE in ms dynamics 365 bc ?

    Set the TableRelation property on the Batch Name field on your tables and the lookup will be handled.

  • SABIH Profile Picture
    339 on at
    RE: how to create new page USING VS CODE in ms dynamics 365 bc ?

    Hello Stefano Demiliani  ,

    Thank you so much for this

    finally page is updated on sandbox but batch name should be lookup to cutbatch page

    cutbackbatch.PNG

    Please see below my table 

    table 50106 CutBackProcessTable
    {
    DataClassification = ToBeClassified;

    fields
    {

    field(1; "Posting Date"; DateTime)
    {
    Caption = 'Posting Date';
    DataClassification = ToBeClassified;

    }
    field(2; "Account Category"; Code[20])
    {
    Caption = 'Account Category';
    DataClassification = ToBeClassified;
    TableRelation = "G/L Account Category";

    }
    field(3; "Bill Code"; Code[20])
    {
    Caption = 'Bill Code';
    DataClassification = ToBeClassified;
    TableRelation = "Dimension Value".Code;
    }

    field(4; "Partner"; Text[250])
    {
    Caption = 'Partner';
    DataClassification = ToBeClassified;
    }
    field(5; "License"; Text[200])
    {
    Caption = 'License';
    DataClassification = ToBeClassified;
    }
    field(6; "Percentage"; Option)
    {
    Caption = 'Percentage';
    OptionMembers = " ","Working Interest","Paying Interest","Revenue – Cost Oil","Revenue – Profit Oil";
    }
    field(7; "Account"; Text[20])
    {
    Caption = 'Account';
    DataClassification = ToBeClassified;

    }
    field(8; "Account Description"; Text[200])
    {
    Caption = 'Account Description';
    DataClassification = ToBeClassified;

    }
    field(9; "AFE"; Text[200])
    {
    Caption = 'AFE';
    DataClassification = ToBeClassified;

    }
    field(10; "Amount"; Integer)
    {
    Caption = 'Amount';
    DataClassification = ToBeClassified;

    }
    field(11; "Batch Name"; Text[20])
    {
    Caption = 'Batch Name';
    DataClassification = ToBeClassified;
    }

    }
    keys
    {
    key(PK; "Bill code")
    {
    //Clustered = true;
    }
    }

    }

    but my requirement is please see below then please advise me how to do in vs code especially in batch section

    Batch Name:

    A Cutback batch can be setup that allows the user to setup section parameters in advance, the user can select an existing batch or create a new on. If the user selects a new batch, the following screen will be presented:

     cutbackbatch.PNG

    When a batch is selected, any unposted lines for that batch will show in the table.

    Please advise me how to do in vs code especially for batch name

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: how to create new page USING VS CODE in ms dynamics 365 bc ?

    You need to create a page of type = worksheet with your fields:

    page 50100 MyWorksheetPage

    {

    PageType = Worksheet;

    ApplicationArea = All;

    UsageCategory = Administration;

    SourceTable = YourTable;

    layout

    {

       area(Content)

       {

           field("Posting Date; "Posting Date")

           {

               ApplicationArea = All;

           }

           //add your other fields here

       }

    }

    }

    Suggestion: if you don't know how to design a particular page, try to export as TXT a similar page from a D365BC local sandbox (C/AL) or from NAV and then convert it to AL using txt2Al tool.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans