hello guys, this code shows both Company and Person Contact. is there any idea(setrange or filter) to display only Person Contact?
Thanks
trigger OnLookup()
var
ContactBusRel: Record "Contact Business Relation";
Contact: Record Contact;
begin
ContactBusRel.Reset;
Contact.Reset;
ContactBusRel.SetRange("Link to Table", ContactBusRel."Link to Table"::Customer);
ContactBusRel.SetRange("No.", "Customer No.");
if ContactBusRel.FindSet() then begin
Contact.SetRange("Company No.", ContactBusRel."Contact No.");
if Page.RunModal(PAGE::"Contact List", Contact) = ACTION::LookupOK then begin
Rec."Customer Contact" := Contact.Name;
Rec."Phone No." := Contact."Phone No.";
Rec.Email := Contact."E-Mail";
Rec.Adress := Contact.Address;
end;
end;
end;
}
Answers
Do you have field "Type" in Contact table?
if yes - then:
Contact(Setrange(Type, contact.Type::Person);
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!