To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
TempOpportunityEntry."Salesperson Code" := Opp."Salesperson Code";
TempOpportunityEntry."Campaign No." := Opp."Campaign No.";
TempOpportunityEntry."Action Taken" := TempOpportunityEntry."Action Taken"::Lost;
TempOpportunityEntry.INSERT;
TempOpportunityEntry.SETRANGE("Action Taken",TempOpportunityEntry."Action Taken"::Lost);
// Delete the following lines.
FORM.RUNMODAL(FORM::"Close Opportunity",TempOpportunityEntry);
Opp2.RESET;
Opp2.SETCURRENTKEY("Sales Document Type","Sales Document No.");
Opp2.SETRANGE("Sales Document Type",Opp."Sales Document Type"::Order);
Opp2.SETRANGE("Sales Document No.","No.");
Opp2.SETRANGE(Status,Opp.Status::Won);
IF NOT Opp2.ISEMPTY THEN
ERROR(Text043);
// End of the deleted lines.
END ELSE
ERROR(Text044);
END;
IF Opp.FINDFIRST THEN BEGIN
IF Opp."Sales Document Type" = Opp."Sales Document Type"::Order THEN
...
...
TempOpportunityEntry."Salesperson Code" := Opp."Salesperson Code";
TempOpportunityEntry."Campaign No." := Opp."Campaign No.";
TempOpportunityEntry."Action Taken" := TempOpportunityEntry."Action Taken"::Lost;
TempOpportunityEntry.INSERT;
TempOpportunityEntry.SETRANGE("Action Taken",TempOpportunityEntry."Action Taken"::Lost);
// Add the following lines.
//FORM.RUNMODAL(FORM::"Close Opportunity",TempOpportunityEntry);
FORM.RUN(FORM::"Close Opportunity",TempOpportunityEntry);
//Opp2.RESET;
//Opp2.SETCURRENTKEY("Sales Document Type","Sales Document No.");
//Opp2.SETRANGE("Sales Document Type",Opp."Sales Document Type"::Order);
//Opp2.SETRANGE("Sales Document No.","No.");
//Opp2.SETRANGE(Status,Opp.Status::Won);
//IF NOT Opp2.ISEMPTY THEN
// ERROR(Text043);
// End of the added lines.
END ELSE
ERROR(Text044);
END;
IF Opp.FINDFIRST THEN BEGIN
IF Opp."Sales Document Type" = Opp."Sales Document Type"::Order THEN
...
...
Opp.Status := Opp.Status::Lost;
Opp."Sales Document Type" := Opp."Sales Document Type"::" ";
Opp."Sales Document No." := '';
Opp.MODIFY;
END;
END;
END;
...
...
Opp.Status := Opp.Status::Lost;
Opp."Sales Document Type" := Opp."Sales Document Type"::" ";
Opp."Sales Document No." := '';
Opp.MODIFY;
END;
// Add the following lines.
Opp2.RESET;
Opp2.SETCURRENTKEY("Sales Document Type","Sales Document No.");
Opp2.SETRANGE("Sales Document Type",Opp."Sales Document Type"::Order);
Opp2.SETRANGE("Sales Document No.","No.");
Opp2.SETRANGE(Status,Opp.Status::Won);
IF NOT Opp2.ISEMPTY THEN
ERROR(Text043);
// End of the added lines.
END;
END;
...