📚 SAP Business One SDK Help

DeleteSalesOpportunityInterestSetup Method
See Also  Example
pISalesOpportunityInterestSetupParams
The key of the interest to be deleted.

Description

Deletes an existing interest.

The interest is specified by its key (Num), which is contained in the SalesOpportunityInterestSetupParams object passed to the method.

Syntax

Visual Basic
Public Sub DeleteSalesOpportunityInterestSetup( _
   ByVal pISalesOpportunityInterestSetupParams As SalesOpportunityInterestSetupParams _
) 

Parameters

pISalesOpportunityInterestSetupParams
The key of the interest to be deleted.

Remarks

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

Example

Deleting a sales opportunity interest (C#)Copy Code
SalesOpportunityInterestSetupParams interestParams = interestService.GetDataInterface( 
    SalesOpportunityInterestsSetupServiceDataInterfaces.soissSalesOpportunityInterestSetupParams) as SalesOpportunityInterestSetupParams; 
 
// Make sure that a record with SequenceNumber = 1 exists 
interestParams.SequenceNo = 1; 
 
Console.WriteLine("Get a SalesOpportunityInterestSetup object with key=" + interestParams.SequenceNo.ToString()); 
SalesOpportunityInterestSetup interest = interestService.GetSalesOpportunityInterestSetup(interestParams); 
 
try 

    interestService.DeleteSalesOpportunityInterestSetup(interestParams); 

catch (Exception e) 

    PrintExceptionMessage(e); 

See Also