Problem in addin sales opportunity - Partners, Competitor

HI All,
I am adding sales opportunity with the help of DI objects. However I am able to add that without partner and competitors info
But while I am trying to add opportunity with Partner and competitors infornmation I am unable to do that first time when there is no entry in partner and competitor. If there is some entry in partner and competetor then I am able to update new values in partner and competitors sucessfully.
Please let me know if there is any solution of what I am doing wrong.
I am adding new info with below mentioned parameters...
_salesOpportunities.Partners.Add();
_salesOpportunities.Partners.Partners
_salesOpportunities.Partners.RelationshipCode
_salesOpportunities.Partners.Details
regards:
Neerav

Hi Neerav.
Please use...
_salesOpportunities.Partners.SetCurrentLine(j);
_salesOpportunities.Partners.Partners
_salesOpportunities.Partners.RelationshipCode
_salesOpportunities.Partners.Details
salesOpportunities.Partners.Add();
regards:
sandy

Similar Messages

  • Error in add Sales Opportunity with DI API 8.8

    Hi folks,
    I have problems saving a Sales Opportunity by using DI API of SAP Business One 8.8 (my version is SP 00 PL 11).
    I get an error like "10000700 - In 'Potential Amount' field, enter number greater than 0".
    I noticed that the required field I'm trying to set, MaxLocalTotal, is read-only. I've used the 2007 version so far and even though that field is not writable, by writing the same value in the field with the same name on the last Opportunity Line I obtain the right value in the header. In this version of the API, that field seems to be mandatory instead.
    Am I doing something wrong to set Potential Amount in the opportunity?
    Does anyone have any suggestion? Thank you in advance.

    Not even one suggestion or advice? Any help is appreciated. Thanks.

  • Add Sales Opportunity using DI API

    Hello Friends,
        I am trying to add Sales Opportunity using DI API.I want to set Potential amount using DI API So I set MaxLocalTotal but while compiling code its give error.Its Read only.
    If I add without potential amount than its gives me error  "Potetial Amout is missing"
    What should I do??
    My Code is 
                   SAPbobsCOM.SalesOpportunities vSOpp;
                    vSOpp = (SAPbobsCOM.SalesOpportunities)globals1.oCompany.GetBusinessObject  (SAPbobsCOM.BoObjectTypes.oSalesOpportunities);
                    vSOpp.CardCode = txtBPCode.Text;
                    if( txtCntctPerCode.Value!="")
                    vSOpp.ContactPerson = Convert.ToInt32(txtCntctPerCode.Value);
                    vSOpp.OpportunityName = txtOppName.Text;
                    vSOpp.SalesPerson = Convert.ToInt32(ddlSEmp.SelectedValue);
                   //vSOpp.WeightedSumLC = Convert.ToDouble(txtPotAmt.Text);
                    vSOpp.MaxLocalTotal = Convert.ToDouble(txtPotAmt.Text);       
                   culture = new CultureInfo("en-US", true);
                    currentprovider = CultureInfo.CurrentCulture;
                    dt1 = DateTime.ParseExact(txtSDate.Text, "dd/MM/yyyy", culture);
                    vSOpp.StartDate = dt1;
      if (vSOpp.Add() != 0)
                        //ResultMessage1.ShowFail("Failed to add a Activity");
                        globals1.oCompany.GetLastError(out nErr, out errMsg);
                        if (0 != nErr)
                            ResultMessage1.ShowFail(globals1.oCompany.GetLastErrorDescription());
                            globals1.oCompany.Disconnect();
                            return;
                    else
                        ResultMessage1.ShowSuccess("Activity added Successfully");
    Please help me to solved this problem.
    Thanks & Regards,
        Swati

    Hi folks,
    I'm facing the same problem. This issue concerns DI API of SAP Business One 8.8 (my version is SP 00 PL 11) in particular.
    I've used the 2007 version so far and even though the MaxLocalTotal field in Sales Opportunity object is read-only, by writing the same value in the field with the same name on the last Opportunity Line I obtain the right value in the header.
    In this version of the API, that field seems to be mandatory instead.
    Does anyone have any suggestion? Thank you in advance.

  • Sales Opportunity Contact Person showing numeric in query & want full name

    Hi,
    I have two sql queries as under :
    SELECT T0.OpprId,T0.OpenDate,  T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName,   T0.U_eqno, T2.Name FROM [dbo].[OOPR]  T0 INNER JOIN [dbo].[OTER]  T1 ON T0.Territory = T1.territryID INNER JOIN OCPR T2 ON T0.CprCode = T2.CntctCode
    In the above query the problem is that I want that the Contact Person name which is selected in the sales opportunity to come. But by which query it is only showing those opportunities in which Contact person is there and NOT showing the ones in which Contact person is not there.
    and the second query
    SELECT T0.OpprId,T0.OpenDate,  T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName, T0.CprCode,   T0.U_eqno FROM [dbo].[OOPR]  T0 INNER JOIN [dbo].[OTER]  T1 ON T0.Territory = T1.territryID
    Its showing the Contact person code but I want the name of the contcat person as avaliable in the sales opprtunity.
    I want result in which the above details come along with the Contact person name. Where I am getting wrong in the query....Please help.
    Regards,
    Kamlesh Gupta

    For Your Second Query, use the following Code that Displays both
    Contact person code and Name
    SELECT T0.OpprId,T0.OpenDate, T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName,T0.CprCode, (Select T1.Name from OCPR t1 where t1.cntctCODE=T0.CprCode),T0.U_eqno  FROM dbo.OOPR T0
    INNER JOIN dbo.OTER T1 ON T0.Territory = T1.territryID

  • ERROR Creating Web Form with "Create Sales Opportunity" checked

    When I create a new web form and choose to "Create Sales Opportunity" I get an error upon saving:
    "- Probability (%) must be a number and may contain a decimal point.
    - Amount must be a number and cannot be empty."

    Never mind, I see the problem. Mac OS X's scroll bars don't show up by default any more. Didn't see the extra fields to fill out.

  • Import Opportunity Partners data reporting non-primary contact relationship

    I currently have three contacts related to each opportunity, but only the primary can be reported in OnDemand. It looks to me like I can use Opportunity Partners to accomplish the reporting of contacts related to the opportunities by linking the contacts in the opportunity partner area.
    Anyone have experience with this problem and/or this solution?
    My other problem is that Oracle says that Opportunity Partner data can not be imported, but I am guessing that someone knows how to do that in some way. maybe using web services??
    thanks

    Hi Mike,
    You may want to try posting your question regarding CRM On Demand's reporting capabilities to the Analytics forum: CRM On Demand Analytics and Reports
    Regarding your second question, WS can be used to associate Partner records as well as Contact records to an Opportunity.
    Thanks,
    Sean

  • Outlook Integration - email as Activity of Sales Opportunity

    Hello all,
    Is there an option to attach an email from Outlook to Sales Opportunity as Activity? Outlook Integration offers a lot of document type, business partners, items, etc., but not Sales Oportunity.
    I really need it for our customer so any ideas how to make it are welcome.
    Regards, Roman

    I haven't found any solution for adding an activity to a sales opportunity with the DIAPI except direct update of the DB. It's not even possible to add a "Follow Up" activity to activity linked to a sales opportunity, DIAPI loose link to sales opportunity.
    According to [1075696|Link activity to an opportunity level DIAPI; and [966860|Adding Activity to Sales Opportunity stage; it is still not possible to do that in DIAPI
    Interesting that in the DTW we can do that...

  • Sales opportunity lines: DocumentType property

    Hi,
    we are using the DI API and we are trying to set the DocumentType field of the SalesOpportunitiesLines Object to one of the values from the BoAPARDocumentTypes enum, but DocumentType will always be empty.
    We can read the correct value if we set it manually in SAP instead.
    We can read the property but can't write it.
    Any ideas, to solve this problem?

    I want to link for example an existing quotation document to an existing sales opportunity.
    In fact in the DIAPI you will find two methods:
    - DocumentType: sets or returns a valid value of BoAPARDocumentTypes that specifies the type of Sales - A/R and Purchasing - A/P documents.
    - DocumentNumber: sets or returns the document ID.
    My problem is that even if I set the DocumentType property to bodt_Quotation (this reprersents a sales quotation object) and sets the DocumentNumber to a valid sales quotation object id, when I try to save the sales opportunity lines object with this information, the system will set the property on SAP to an empty value overriding my values.

  • Sales Opportunity number field

    In Open Items report (Sales Orders) is it possible to have column displaying Sales opportunity number that the sales order was created from?
    I have looked through form settings but cannot find this field?

    Hi Andrew.......
    It is not possible to make any modification to the standard reports given by SAP. But you may have your own query report......
    Regards,
    Rahul

  • Problem in importing Sales Order with udf in the rows

    Dear All,
    I am having problem in importing Sales Order with udf in the rows. I mean it is getting imported but the udf values in the rows is not getting updated. But the udf values in the header is getting updated. I am using SAP 8.8 Pl 10.
    Can anyone guide me what to do in this scenario?
    Regards,
    Gary

    So , Login to DTW .
    with the Desired Database and Login Credentials.
    Goto - > Templates - > Customized Templates
    Select The Object .
    Right Click on the object needed and choose Create Template for the Structure .
    Then use this template for import .
    Hope it helps
    Thanks
    Ashish Ranjan

  • Display all pending quotation on sales opportunity window

    how display all pending quotation of that customer on sales opportunity window through navigation arrow?

    Hi,
    Run below query in query generator first and save it under query manger. Open sales opportunity and run saved query to get list of open sales quotation.
    SELECT t2.docnum
    FROM OOPR T0
    JOIN OPR1 T1 ON T1.OpprId = T0.OpprId and T1.ObjType='23'
      left join OQUT T2 on t2.DocEntry =  T1.[DocID]
      left JOIN QUT1 T3 ON T2.DocEntry = T3.DocEntry
       where T2.[DocStatus] = 'o' and t2.cardcode = $[OOPR.cardcode]
    Thanks & Regards,
    Nagarajan

  • Problem on archieving sales documents

    Hi Experts,
    I found a problem when archieving sales docs. (Object: SD_VBAK). Error was "Subsequent order (delivery) is not complete:00080xxxxx".
    Compared with the DNs of successful sales docs. & failure sales docs., found that the field "Intercompany Billing Status" under "Processing" tab of DN item was "A - Not yet processed" for the DNs of failure sales docs. while it was blank (Not Relevant) for the DNs of successful sales docs. Also, in Document Flow, the status for DNs of failure sales docs. was "Being processed" while the status for DNs of successful sales docs. was "Completed". However, those DNs of failure sales docs. were already fully picked, GI completed & fully invoiced.
    Could you advise the cause of this failure & error and how to fix it ?
    Many Thanks,
    KH Fong

    Dear Fong,
         Our problem is to Archive the data, which we cannot do without completing to  processing cycle. What I would do is sit with Functional or BU showing them status "Not yet Processed". Ask them suggestion to complete the cycle to finish the archiving.
         They are best informed people about status. I feel no other would help.
    Thanks,
    Kolusu 

  • Last stages of Sales Opportunity in XL reporter

    Hi all!
    I would like to print last stage of Sale opportunity in Xl reporter. NOw, i only show all all stages in report but i want only last satges.
    Could you help me!
    Thanks!

    Hi
    Please take the stages in the Parameter. so that you can take the report as per the stages
    Hope it help
    Ashish Gupte

  • Status update on Sales Opportunity when Quotation is won

    I need to set up an automatic status update for the sales opportunity; when the quotation is set as won, the related sales opportunity is also set as won. I have tried the <Define status profile for user statuses> in IMG, but don't seem to get it right..
    Can anyone help me?
    Krgds, Eva

    HI Eva,
    Even i did the same thing for my project. Updating the Sub contract status, with whatever the master contract has got.
    SO i used the ORDER_SAVE badi, and called a FM , where i wrote the logic to update the subcontract.
    So u can also do the same thing, by coding in the ORDER_SAVE badi, what ever logic u want.
    Reward points if helpful.
    Robin

  • Adding Activity to Sales Opportunity stage

    I'm trying to create a new activity using the DI API and link it to a certain Sales Opportunity stage.
    I've been looking at the SalesOpportunities and SalesOpportunitiesLines objects to see if I could add an activity there, and I've looking at the Contacts object to see if I could set the SalesOpportunity (stage) there.
    Neither seems to be possible.
    Does anybody know how to link activities to sales opportunities?

    its object Contacts
    there fill properties
    DocType to 97
    ParentobjectId and Parentobjecttype
    I recommend to create one activity by hand through sbo and make select from OCLG table and check, what is tehre filled.

Maybe you are looking for

  • How do I stop voice memos from crashing on Iphine 5 version 6.1.4

    Hi, When I start Voice Memos, the screen showing the microphone flashes on and immediately disappears. The icon is still in the active bar (double click on Home button) This issue has been presented in a few posts, but with no response that is succes

  • Software Updater for E63

    Where can I get software Updater for E63.. I have tried to download from nokia website but I couldn't find how to download.. I have downloaded flash player as per the instructions.. Now please tell me what I have to do next???

  • Documentation for process chains

    hi can any body pls send me documentation regarding process chains. i have just finshed a course a in BW. pls mail them to at [email protected]

  • HDD setup - Internal RAID, External RAID or single discs

    I know variations on this question have been done to death on this forum, but I'm still struggling to understand how to apply it to my specific requirements and hardware. I am looking to optimise the performance/speed of my Hackintosh for video editi

  • CLAD Sample Exam 1, question 2:

    CLAD Sample Exam 1, question 2: can a wire be used to pass date between 2 llps that are intended to be runn in parallel?  CLAD Sample exam1  provides the following url as an answer:  http://zone.ni.com/devzone/cda/tut/p/id/9393 . This doesn't explain