📚 SAP Business One SDK Help

UpdateSalesOpportunityInterestSetup Method
See Also  Example
pISalesOpportunityInterestSetup
The data for the interest to be updated. The SalesOpportunityInterestSetup object must contain the key of the object to be updated.

Description

Updates an existing interest.

The data for the interest, including the key of the interest to be updated, is contained in the SalesOpportunityInterestSetup object passed to the method. To update an interest, you must first retrieve it using the GetSalesOpportunityInterestSetup method.

Syntax

Visual Basic
Public Sub UpdateSalesOpportunityInterestSetup( _
   ByVal pISalesOpportunityInterestSetup As SalesOpportunityInterestSetup _
) 

Parameters

pISalesOpportunityInterestSetup
The data for the interest to be updated. The SalesOpportunityInterestSetup object must contain the key of the object to be updated.

Example

Updating 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; 
 
SalesOpportunityInterestSetup interest = interestService.GetSalesOpportunityInterestSetup(interestParams); 
 
interest.Description = "new value"; 
interest.Sort = interest.Sort + 1; 
try 

    interestService.UpdateSalesOpportunityInterestSetup(interest); 

catch (Exception e) 

    PrintExceptionMessage(e); 
}

See Also