📚 SAP Business One SDK Help

UpdateSalesOpportunitySourceSetup Method
See Also  Example
pISalesOpportunitySourceSetup
The data for the source to be updated. The SalesOpportunitySourceSetup object must contain the key of the object to be updated.

Description

Updates an existing source.

The data for the source, including the key of the source to be updated, is contained in the SalesOpportunitySourceSetup object passed to the method. To update a source, you must first retrieve it using the GetSalesOpportunitySourceSetup method.

Syntax

Visual Basic
Public Sub UpdateSalesOpportunitySourceSetup( _
   ByVal pISalesOpportunitySourceSetup As SalesOpportunitySourceSetup _
) 

Parameters

pISalesOpportunitySourceSetup
The data for the source to be updated. The SalesOpportunitySourceSetup object must contain the key of the object to be updated.

Example

Updating a sales opportunity source (C#)Copy Code
SalesOpportunitySourceSetupParams sourceParams = sourceService.GetDataInterface( 
    SalesOpportunitySourcesSetupServiceDataInterfaces.sosssSalesOpportunitySourceSetupParams) as SalesOpportunitySourceSetupParams; 
 
// Make sure that a record with SequenceNo = 1 exists 
sourceParams.SequenceNo = 1; 
 
SalesOpportunitySourceSetup source = sourceService.GetSalesOpportunitySourceSetup(sourceParams); 
source.Description = "new value"; 
source.Sort = source.Sort + 1; 
 
try 

    sourceService.UpdateSalesOpportunitySourceSetup(source); 

catch (Exception ex) 

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

See Also