Hi All,
I am doing Aging report for that report i had a column named Project name it is the dimension value from shortcut dimension 4, if the customer ledger entries source code field is set to sales then i want project name from the salesinvoice line. i am writing my code from onaftergetrecord of customer ledger entry but it is not coming, correctly can anyone help me.
if CustLedgEntryEndingDate."Source Code" = 'Sales' then begin
GLSetup.Get();
DeimensionSetEntry.Reset();
DeimensionSetEntry.SetRange("Dimension Code", GLSetup."Shortcut Dimension 4 Code");
DeimensionSetEntry.SetRange("Dimension Set ID", SalesInvLine."Dimension Set ID");
if DeimensionSetEntry.FindFirst() then
Var_JobNo := DeimensionSetEntry."Dimension Value Code";
DimensionValue.Reset();
DimensionValue.SetRange(code, Var_JobNo);
if DimensionValue.FindFirst() then
Var_JobNo := DimensionValue.Name;
end;
Thanks & Regards,
Satish.
Hi, hope the following can give you some hints.
Dimension Set Entries Overview
Thanks.
ZHU
hi, try this code:
procedure GetDimValueName(var DimValueName: Text[50]) var CustLedgEntryEndingDate: Record "Cust. Ledger Entry"; GLSetup: Record "General Ledger Setup"; DimensionSetEntry: Record "Dimension Set Entry"; SalesInvLine: Record "Sales Invoice Line"; DimensionValue: Record "Dimension Value"; DimValueCode: Code[20]; begin if CustLedgEntryEndingDate."Source Code" = 'Sales' then begin GLSetup.Get(); DimensionSetEntry.Reset(); DimensionSetEntry.SetRange("Dimension Code", GLSetup."Shortcut Dimension 4 Code"); DimensionSetEntry.SetRange("Dimension Set ID", SalesInvLine."Dimension Set ID"); if DimensionSetEntry.FindFirst() then begin DimValueCode := DimensionSetEntry."Dimension Value Code"; if DimensionValue.get(GLSetup."Shortcut Dimension 4 Code", DimValueCode) then DimValueName := DimensionValue.Name; end; end; end;
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Gian
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,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156