Dears, Good day to all...
Thanks in advance for your support,
I am creating a new Layouts like the below:
I tried to get the Account Name (it should be getting from several tables based on the Account type)
Also, I need to add the Third and Fourth Dimensions.
For the Name you can use this to get it,
case "Source Type" of "Source Type"::Customer: IF Customer.READPERMISSION THEN IF Customer.GET("Source No.") THEN SourceName := Customer.Name;
"Source Type"::Vendor: if Vendor.READPERMISSION then if Vendor.GET("Source No.") then SourceName := Vendor.Name;
"Source Type"::Employee: if Employee.READPERMISSION then if Employee.GET("Source No.") then SourceName := Employee."Last Name";
"Source Type"::"Fixed Asset": if FixedAsset.READPERMISSION then if FixedAsset.GET("Source No.") then SourceName := FixedAsset.Description;
"Source Type"::"Bank Account": if BankAccount.READPERMISSION then if BankAccount.GET("Source No.") then SourceName := BankAccount.Name;
As for the dimensions
GLSetup.GET; DimensionSetEntry.RESET; DimensionSetEntry.SETRANGE("Dimension Set ID", " Gen. Journal Line " ."Dimension Set ID"); DimensionSetEntry.SETRANGE("Dimension Code",GLSetup."Shortcut Dimension 3 Code"); IF DimensionSetEntry.FINDFIRST THEN BEGIN DimensionSetEntry.CALCFIELDS("Dimension Value Name"); Dimension3Name := DimensionSetEntry."Dimension Value Name"; END;
I added in the Codeunit and I got this error
Did you find a solution for this ???
A CASE always need an
This is basic development, so this is something you really should have found out by know. Also hovering over the word CASE should also tell you that the END is the problem.