📚 SAP Business One SDK Help

DeleteSalesOpportunityCompetitorSetup Method
See Also  Example
pISalesOpportunityCompetitorSetupParams
The key of the competitor to be deleted.

Description

Deletes an existing competitor.

The competitor is specified by its key (CompetId), which is contained in the SalesOpportunityCompetitorSetupParams object passed to the method.

Syntax

Visual Basic
Public Sub DeleteSalesOpportunityCompetitorSetup( _
   ByVal pISalesOpportunityCompetitorSetupParams As SalesOpportunityCompetitorSetupParams _
) 

Parameters

pISalesOpportunityCompetitorSetupParams
The key of the competitor to be deleted.

Remarks

You cannot delete a sales opportunity competitor that is associated with a sales opportunity.

Example

Deleting a sales opportunity competitor (C#)Copy Code
try 

    SalesOpportunityCompetitorSetupParams delLine; 
    delLine = (SalesOpportunityCompetitorSetupParams)oCompetSrv.GetDataInterface(SalesOpportunityCompetitorsSetupServiceDataInterfaces.socssSalesOpportunityCompetitorSetupParams); 
 
    // Delete a record 
    // The SequenceNo should be the competitor ID of a record in the DB 
    delLine.SequenceNo = 31; 
    oCompetSrv.DeleteSalesOpportunityCompetitorSetup(delLine); 

catch (Exception ex) 

    Interaction.MsgBox(ex.Message, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); 

See Also