ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 18 - Customer - OnBeforeGetCustNoOpenCard

Open MattiLE opened this issue 7 years ago • 4 comments

Hi AL-Team, can you please add the following Publisher in GetCustNoOpenCard?

procedure GetCustNoOpenCard(CustomerText: Text; ShowCustomerCard: Boolean; ShowCreateCustomerOption: Boolean): Code[20]
    var
        Customer: Record Customer;
        CustomerNo: Code[20];
        NoFiltersApplied: Boolean;
        CustomerWithoutQuote: Text;
        CustomerFilterFromStart: Text;
        CustomerFilterContains: Text;
    begin
        // NEW >>>
        OnBeforeGetCustNoOpenCard(Rec,Customer);
        // NEW <<<<
        if CustomerText = '' then
            exit('');

    [IntegrationEvent(false, false)]
    local procedure OnBeforeGetCustNoOpenCard(var Rec: Record Customer; var Customer: Record Customer)
    begin
    end;

MattiLE avatar Nov 13 '19 16:11 MattiLE

What is the purpose of parameter Customer? Should it be CustomerText instead? Custome is local variable and it will be ovewritten in next Get statement.

AlexanderYakunin avatar Nov 28 '19 13:11 AlexanderYakunin

In the case that the customer cannot be fetched via Get, an additional filter should be set. Maybe then the event should take place after this place:

IF STRLEN(CustomerText) <= MAXSTRLEN(Customer."No.") THEN IF Customer.GET(COPYSTR(CustomerText,1,MAXSTRLEN(Customer."No."))) THEN EXIT(Customer."No.");

MattiLE avatar Nov 28 '19 13:11 MattiLE

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Nov 29 '19 11:11 bc-ghost

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Dec 13 '19 13:12 bc-ghost