on 02-21-2015 4:41 AM
Hello,
I have created an asp to add Sales Opportunities.
I wanna add it but not getting all the fields using SAPbobsCOM.
My Code which I am using is:-
SAPbobsCOM.SalesOpportunities oSalesOpportunitiy = (SAPbobsCOM.SalesOpportunities)oCompany.GetBusinessObject(BoObjectTypes.oSalesOpportunities);
SAPbobsCOM.BoSoOsStatus status = new BoSoOsStatus();
if (Request.Form["status"] == "Open")
{
status = BoSoOsStatus.sos_Open;
}
else if (Request.Form["status"] == "Close")
{
status = BoSoOsStatus.sos_Missed;
}
else
{
status = BoSoOsStatus.sos_Sold;
}
oSalesOpportunitiy.CardCode = Request.Form["BPCode"];
oSalesOpportunitiy.CustomerName = Request.Form["BPName"];
oSalesOpportunitiy.ContactPerson = Convert.ToInt32(Request.Form["ContactPerson"]);
oSalesOpportunitiy.SalesPerson = Convert.ToInt32(Request.Form["SalesEmployee"]);
oSalesOpportunitiy.Lines.MaxLocalTotal = Convert.ToDouble(Request.Form["PotentialAmount"]);
oSalesOpportunitiy.Status = status;
oSalesOpportunitiy.StartDate = Convert.ToDateTime(Request.Form["StartDate"]);
oSalesOpportunitiy.PredictedClosingDate = Convert.ToDateTime(Request.Form["PredictedClosingDate"]);
oSalesOpportunitiy.BPChanelCode = Request.Form["BPChannelCode"];
oSalesOpportunitiy.BPChanelName = Request.Form["BPChannelName"];
oSalesOpportunitiy.BPChannelContact = Convert.ToInt32(Request.Form["BPChannelContact"]);
oSalesOpportunitiy.OpportunityName = Request.Form["OppName"];
oSalesOpportunitiy.ProjectCode = Request.Form["BPProject"];
oSalesOpportunitiy.Territory = Convert.ToInt32(Request.Form["BPTerritory"]);
oSalesOpportunitiy.Source = Convert.ToInt32(Request.Form["InformationSource"]);
oSalesOpportunitiy.Remarks = Request.Form["remark"];
if (oSalesOpportunitiy.Add() != 0)
{
string error = oCompany.GetLastErrorDescription();
Response.Write(error);
}
oCompany.Disconnect();
Some of the fields I got but not the all.
So, Please help me and suggest me the rest of the fields.
Hi Ravi,
in general most of ( ! ) all fields are available through DI API. But unfortunately they are called differently in ( client <> database <> SDK ).
I usually check the database field name and search for it in SDK help. If you have no luck : what are the missing fields ?
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.