ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 5050 (Contact) - in function LookupCustomerTemplate

Open MattiLE opened this issue 7 years ago • 2 comments

Hi AL-Team, we would like to set additional filters in the function "LookupCustomerTemplate". So can you please add the following Publisher?

[External] LookupCustomerTemplate() : Code[20]
CustomerTemplate.FILTERGROUP(2);
CustomerTemplate.SETRANGE("Contact Type",Type);
CustomerTemplate.FILTERGROUP(0);
CustomerTemplateList.LOOKUPMODE := TRUE;
// >> NEW
LookupCustomerTemplateOnBeforeSettableview(Rec,CustomerTemplate);
// << NEW
CustomerTemplateList.SETTABLEVIEW(CustomerTemplate);
IF CustomerTemplateList.RUNMODAL = ACTION::LookupOK THEN BEGIN
  CustomerTemplateList.GETRECORD(CustomerTemplate);
  EXIT(CustomerTemplate.Code);
END;

Publisher definition:
IncludeSender: false
GlobaVarAccess: false
LOCAL [IntegrationEvent] LookupCustomerTemplateOnBeforeSettableview(VAR Contact: Record Contact;VAR CustomerTemplate: Record "Customer Template")

MattiLE avatar Jul 11 '19 06:07 MattiLE

Do you really need Contact passed by reference?

StanPesotskiy avatar Jul 26 '19 12:07 StanPesotskiy

Hi Stan, it is only necessary to pass CustomerTemplate by reference.

MattiLE avatar Jul 26 '19 12:07 MattiLE