Expression cannot be type-converted

mfhmfh Member Posts: 28
I try to get the "Quantity" from the Sales Line in a dataport with Data Item "Purch. Rcpt. Line". The code is in the OnBeforeExportRecord:
IF gRecSalesLine.GET("Purch. Rcpt. Line"."Sales Order No.","Purch. Rcpt. Line"."Sales Order Line No.") THEN
  gDecBaseQty := gRecSalesLine.Quantity;
If I execute the dataport, I receive the error:
'The expression Code cannot be type-converted to a Option value'.

I don't understand this message. Why is it complaining about a Option value?
Regards,
Michiel

Comments

  • mfhmfh Member Posts: 28
    Oeps! Sorry to have bothered you guys. I found a topic in which Mark answers my question: I just added the "Sales Line"."Order Type"::Order to my query!
    Regards,
    Michiel
Sign In or Register to comment.