25. Oktober 2010 15:07
IF "Sell-to Country/Region Code"='CH' THEN BEGIN
vShipToAdress.SETRANGE("Customer No.",'CH');
IF NOT vShipToAdress.FIND('-') THEN
ERROR('Keine Lieferadresse für CH vorhanden');
ShipAdress.SETTABLEVIEW(vShipToAdress);
ShipAdress.LOOKUPMODE(TRUE);
IF ShipAdress.RUNMODAL = ACTION::LookupOK THEN BEGIN
"Ship-to Name":=vShipToAdress.Name;
"Ship-to Name 2":=vShipToAdress."Name 2";
"Ship-to Address":=vShipToAdress.Address;
"Ship-to Address 2":=vShipToAdress."Address 2";
"Ship-to City":= vShipToAdress.City;
"Ship-to Post Code":=vShipToAdress."Post Code";
VALIDATE("Ship-to Country/Region Code",vShipToAdress."Country/Region Code");
VALIDATE("Shipment Method Code",vShipToAdress."Shipment Method Code");
VALIDATE("Location Code" ,vShipToAdress."Location Code");
VALIDATE("Shipping Agent Code", vShipToAdress."Shipping Agent Code");
VALIDATE("Shipping Agent Service Code",vShipToAdress."Shipping Agent Service Code");
END;
END;
25. Oktober 2010 15:20
26. Oktober 2010 10:31
26. Oktober 2010 10:40
vShipToAdress.SETRANGE("Customer No.",'CH');