Dear all,
i am stuck with the al code for doing this issue.
. In the Job planning Lines Page, there are Columns called Qty and Qty to Transfer to Journal. we need to add one column after Qty to Transfer Journal with the total of items already transferred to the journal based on the Qty Column (if the type is Item) and Posted that Jorurnal
Here in the screen shot, the 1st line Total Qty is 100 and we transferred 43 so in total Qty Column Transferred also should come 43. if we transfer the again 10 from the total of 100 Qty then total transfer Column should update 43+10 = 53
once fully transferred then it should be same as Qty column.
Hello Nithin & Mohana
its working now. thank you for your kind Support
Please change the below like from
JobPlanningLine."Total Tranfer Qty" += JobJournalLine.Quantity;
to
JobPlanningLine."Total Tranfer Qty" += JobPlanningLine."Qty. to Transfer to Journal";
Yes i changed to decimal and post the Journal then also its not coming.
just now i entered the item, then post the item also. then also the field doesnt have an value
Make this field as Decimal
Field(60102; "Total Tranfer Qty"; Decimal)
Did you try to post Job Journal? If it will be updated if you post the Job journal.
Thanks.
Thankyou Nithin for your kind Support. Most of the times you are helping me alot to crack the result.
here the field not coming .but while compiling no error is come.
You can do as per the following in the codeunit.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Job Transfer Line", 'OnFromPlanningLineToJnlLineOnBeforeCopyItemTracking', '', false, false)]
local procedure OnFromPlanningLineToJnlLineOnBeforeCopyItemTracking(var JobJournalLine: Record "Job Journal Line"; var JobPlanningLine: Record "Job Planning Line"; var IsHandled: Boolean);
begin
JobPlanningLine."Total Tranfer Qty" += JobJournalLine.Quantity;
JobPlanningLine.Modify();
end;
How we can write in al code. anyone pls help me on this
Ohh ok.
The you have to use OnFromPlanningLineToJnlLineOnBeforeCopyItemTracking event to update JobPlanningLine field Total Tranfer Qty
JobPlanningLine .Total Tranfer Qty += JobPlanningLine .Quantity;
JobPlanningLine .modify;
No its not updating. i checked many jobs
how we bring it in code,(only posted)
I think you didnt transfer anything yet in your screenshot.
43 is yet to transfer.
once you transferred then remaining qty should update.
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,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156