Modify a Record from a RequestPage

MelekBoujelbeneMelekBoujelbene Member Posts: 17
edited 2020-12-17 in NAV Three Tier
Hello NAV experts,

Is it possible to modify a Record from a RequestPage ?
Here is a code example that generates an Error "ID=0"
dataset
{
        dataitem(CalculLoyerEntete; "Calcul Loyer Entete")
        {
          DataItemTableView = SORTING("ID");
          column(Name;Name) { }
          column(DateMail;FORMAT("Creation Date Last Mail",0,'<Day,2> <Month Text> <Year4>')){ }
        }
}

requestpage
{
        layout
        {
            area(content)
            {
              trigger OnOpenPage();
              begin
                 CalculLoyerEntete.Validate("Creation Date Last Mail",Today);
                 CalculLoyerEntete.Modify;
             end;
           }
        }
}

I think "CalculLoyerEntete.Modify;" is causing this Error.


Thanks in advance.

Answers

Sign In or Register to comment.