web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Disable a part of Third party code

(0) ShareShare
ReportReport
Posted on by 297

My third party 's page extension code has a part to prevent to enter Transfer order line.

trigger OnInsertRecord(BelowxRec: Boolean): Boolean
var
TransferLine: Record "Transfer Line";


begin
TransferLine.SetRange("Document No.", Rec."Document No.");
TransferLine.setfilter("Release Prod. Order No.", '<>%1', '');

if not TransferLine.IsEmpty then

error('You can not add new lines in case this Transfer Order is used to transfer for Production orders');
end;

How can I disable it through my code ?

Thank you.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Disable a part of Third party code

    Hi,

    When you write a code to insert new records to this table, write as per below

    Rec.Insert(false);

    or Rec.Insert();

    Thanks.

  • Hoang Ng Profile Picture
    297 on at
    RE: Disable a part of Third party code

    Thanks Nitin,

    I don't use code to insert transfer line. User enters it just by adding new line.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Disable a part of Third party code

    Then you can not avoid this, if you have source code available with you, you can write your own logic how you can prevent this insertion code.

    Thanks.

  • Hoang Ng Profile Picture
    297 on at
    RE: Disable a part of Third party code

    Thanks Nitin.

    If there is no way to overwrite on 3rd code, I think I will show the new page, user selects items, then I will use your suggested code to insert the transfer lines.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,901

#2
YUN ZHU Profile Picture

YUN ZHU 2,079 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 2,041

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans