Announcements
Hi all,
I have created a new field called Unit Price in the Transfer Line table and then I added that field in the Transfer Order subform as well. Now when I create a Transfer order and select Item no I want also the Unit price(In my Transfer Line) of that Item to populate directly from the Item card(Take the value which is in the Item card unit price). The same way description and unit of measure populate.
Thank you for your constant assistance.
that's supper ZHU
thank you so much
Hi, try the following.
tableextension 80122 MyExtension extends "Transfer Line" { fields { modify("Item No.") { trigger OnAfterValidate() var Item: Record Item; begin if Item.Get("Item No.") then "Unit Price" := Item."Unit Price"; end; } field(50100; "Unit Price"; Decimal) { DataClassification = CustomerContent; } } } pageextension 80122 MyExtension extends "Transfer Order Subform" { layout { addafter(Quantity) { field("Unit Price"; Rec."Unit Price") { ApplicationArea = All; } } } }
Hope this will help.
Thanks.
ZHU
Just so you are aware. When you do a transfer the unit cost that is posted will be determined by the costing method on your items. But your added field might fill another purpose. Anyway i just wanted to let you know.
Thank you Josh,
Can you please guide me on how to accomplish this you have mentioned new another object "Event subscriber"
Create an event subscriber to the transfer line table OnAfterInsert. Use the .GET() to fill a var of the item table and then pass the required value to your field and modify()
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156