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.
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.
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.
Thanks Nitin,
I don't use code to insert transfer line. User enters it just by adding new line.
Hi,
When you write a code to insert new records to this table, write as per below
Rec.Insert(false);
or Rec.Insert();
Thanks.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156