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

Announcements

No record found.

News and Announcements icon
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 307

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.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    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
    307 on at

    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,812 Moderator on at

    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
    307 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
AndrewThomas81 Profile Picture

AndrewThomas81 390 Super User 2026 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 386 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans