Ok ..had a look at the code. The code comes from base app so for example I have this extension looking up purchase header
MY_RequisitionLine extends "Requisition Line"
{
fields
{
field(62461; MY_VendorShipNo; Code[50])
{
CalcFormula = lookup("Purchase Header"."Vendor Shipment No."
WHERE("Document Type" = const(Order),
"No." = field("Ref. Order No."),
"Document Type" = field("Ref. Order Type")
so how do I change Document Type above or Order Type as these are not user fields I have control over