📚 SAP Business One SDK Help

AddSalesOpportunitySourceSetup Method
See Also  Example
pISalesOpportunitySourceSetup
The data for the new source.

Description

Adds a source.

Syntax

Visual Basic
Public Function AddSalesOpportunitySourceSetup( _
   ByVal pISalesOpportunitySourceSetup As SalesOpportunitySourceSetup _
) As SalesOpportunitySourceSetupParams

Parameters

pISalesOpportunitySourceSetup
The data for the new source.

Return Type

Contains the key (Num) of the new source.

Example

Adding a sales opportunity source (C#)Copy Code
SalesOpportunitySourceSetup source = sourceService.GetDataInterface( 
    SalesOpportunitySourcesSetupServiceDataInterfaces.sosssSalesOpportunitySourceSetup) as SalesOpportunitySourceSetup; 
 
source.Description = "book"; 
source.Sort = 1000; 
Console.WriteLine("Add a new information source: Description: " + source.Description + "  Sort:" + source.Sort.ToString()); 
 
try 

    sourceService.AddSalesOpportunitySourceSetup(source); 

catch (Exception ex) 

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

See Also