hougaard / Simple-Object-Designer

Issue tracking for the Simple Object Designer for Business Central
7 stars 0 forks source link

Report Calculated Field for I purchase line #340

Closed altavistatech closed 6 months ago

altavistatech commented 6 months ago

I am trying to add a calculated field on a Purchase Order line.

The expression should be this. Purchase Line."Direct Unit Cost"/Purchase Line.UofM_Wt_KG

I used the Cheat Sheet to pull in the first field and then used that syntax to add a SOD field. When I go to publish the app I get an error on Purchase and Line that they are not recognized values. I have tried removing the space, using an underscore and putting the name in quotes but still the equation will not verify and will not deploy. Is there an issue with Purchaser Line?

hougaard commented 6 months ago

How about?

Rec."Direct Unit Cost" / Rec.UofM_Wt_KG

altavistatech commented 6 months ago

I appreciate your input however now I am getting this error.

Package validation failed due to the following error(s): ReportExtensions/Purchase_Order_ReportExt.al (227,44) - Error AL0118: The name 'Rec' does not exist in the current context. ReportExtensions/Purchase_Order_ReportExt.al (227,19) - Error AL0118: The name 'Rec' does not exist in the current context.

hougaard commented 6 months ago

Ahh.. on a report, (I have got page syntax):

Try:

"Purchase Line"."Direct Unit Cost"/"Purchase Line".UofM_Wt_KG

altavistatech commented 6 months ago

OK I thought I tried that but apparently there is a PICNIC error going on.