I am unable to find what is the use of page field trigger i.e: OnAssistEdit. if any one knows well about it. please share the knowledge.
I am unable to find what is the use of page field trigger i.e: OnAssistEdit. if any one knows well about it. please share the knowledge.
Example from the base app from the contact card page below. It largely depends on what UX you want. Lookups have a dropdown menu displayed. Whereas an assist edit opens a pre filtered chosen page:
field(Name; Name)
{
ApplicationArea = All;
AssistEdit = true;
Importance = Promoted;
ShowMandatory = true;
ToolTip = 'Specifies the name of the contact. If the contact is a person, you can click the field to see the Name Details window.';
trigger OnAssistEdit()
var
Contact: Record Contact;
begin
if "No." = '' then begin
Insert(true);
Commit;
end;
Contact := Rec;
Contact.SetRecFilter;
if Contact.Type = Contact.Type::Person then begin
Clear(NameDetails);
NameDetails.SetTableView(Contact);
NameDetails.SetRecord(Contact);
NameDetails.RunModal;
end else begin
Clear(CompanyDetails);
CompanyDetails.SetTableView(Contact);
CompanyDetails.SetRecord(Contact);
CompanyDetails.RunModal;
end;
Rec := Contact;
CurrPage.Update(false);
end;
}
Hi,
please follow the logic for field No. in the Job Card, as below :
Thanks,
Tanya Kharbanda
Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has a verified answer.
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156