Skip to main content

Notifications

Microsoft Dynamics NAV forum
Unanswered
Posted on by 768

Hello Expert,

i am inserting record into my custom table consuming web services that's work fine.

now i am storing its history in history table Like old value / New value which is working properly when i am updating the record directly in Business Central but when i update record from jsonObject mean through web service it is not working i have debug the solution so the xRec not getting the X value below is the code.

if (xRec."RFI DueDate" <> 0Dthen begin
            Message(Format(xRec."RFI DueDate"));
            if (Rec."RFI DueDate" <> xRec."RFI DueDate"then begin
                rfiHistory.Init();
                if rfiHistory.FindLast then
                    rfiHistory.ID := rfiHistory.ID + 1;
                rfiHistory."job No." := Rec."Job No.";
                rfiHistory."RFI No." := Rec."RFI Number";
                rfiHistory."Modified On" := Rec."Modified On";
                rfiHistory."Modified By" := Rec."Modified By";
                rfiHistory."Old Value" := format(xRec."RFI DueDate");
                rfiHistory."Current Value" := format("RFI DueDate");
                rfiHistory."RFI Field Name" := 'RFI DueDate';
                rfiHistory.Insert(true);
            end;
        end;

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

Dynamics 365 Community Update – Sep 16th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans