locked
error when adding quotedetail RRS feed

  • Question

  • Hello ,
    Im a java programmer ,and recently working with c# .net
    Im trying to copy a quote with its product
    creating the new quote is ok ,but Im having a pb when creating the quote detail ,I have an exception ,but the message does not help me alot

    here is a snap of my code

    Code Block

    clonnedDetaile.baseamount=produit.baseamount;
                clonnedDetaile.description = produit.description;
                clonnedDetaile.extendedamount=produit.extendedamount;
                clonnedDetaile.ispriceoverridden=produit.ispriceoverridden;
                clonnedDetaile.isproductoverridden=produit.isproductoverridden;
                clonnedDetaile.manualdiscountamount=produit.manualdiscountamount;
                clonnedDetaile.new_remise_perc=produit.new_remise_perc;
                clonnedDetaile.new_totht=produit.new_totht;
                clonnedDetaile.new_tva=produit.new_tva;
                clonnedDetaile.priceperunit=produit.priceperunit;
                clonnedDetaile.productdescription=produit.productdescription;
                clonnedDetaile.productid=produit.productid;
                clonnedDetaile.quantity=produit.quantity;
                clonnedDetaile.salesrepid=produit.salesrepid;
                clonnedDetaile.tax=produit.tax;
                clonnedDetaile.uomid=produit.uomid;
                clonnedDetaile.volumediscountamount=produit.volumediscountamount;

     try
                {
                    crmService.Create(clonnedDetaile);
                }
                catch (SoapException ex)
                {
                    Console.WriteLine("error is is is --------" + ex.GetBaseException().StackTrace);
                }



    here is my the error message
    Code Block

    à System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       à System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       à WindowsApplication1.WebReference.CrmService.Create(BusinessEntity entity) dans C:\Documents and Settings\houssam.ST-R\Mes documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Web References\WebReference\Reference.cs:ligne 184
       à WindowsApplication1.Form1.addProduit(quotedetail produit, String clonedDevisId, CrmService crmService) dans C:\Documents and Settings\houssam.ST-R\Mes documents\Visual Studio 2005\Projects\WindowsApplication1\WindoUne exception de première chance de type 'System.Web.Services.Protocols.SoapException' s'est produite dans System.Web.Services.dll
    Une exception de première chance de type 'System.Web.Services.Protocols.SoapException' s'est produite dans System.Web.Services.dll
    wsApplication1\Form1.cs:ligne 279


    thank you in advance
    Monday, January 21, 2008 5:40 PM

Answers

  • Are you using some datetime on your code. can you paste your full code as error message is like some regional setting change in date or currency etc.

     

    Best Regards,

    Imran

     

    http://microsoftcrm3.blogspot.com

     

    Wednesday, January 23, 2008 6:12 AM
    Moderator
  • ok thank you ,I have found the pb
    it was concerning the id quote and lookup
    a difference I have found comparing to java is the errors exceptions
    with java you have a real detailed errors
    Wednesday, January 23, 2008 8:24 AM

All replies

  • First of all to see the exact error use 

    Code Block
    Console.WriteLine("error is is is --------" + ex.Detail.InnerText);

     


    Once you get the error than we can help you debug better.


    Oshri Cohen
    http://mymscrm3.blogspot.com/
    http://www.linkedin.com/in/oshricohen




    Monday, January 21, 2008 9:23 PM
  • thank you for your answer
    here is the error I get now ,I tried to search with google some help for  0x80040216 , but no luck

    error is is is --------
    0x80040216
    An unexpected error occurred.
    Platform


    Tuesday, January 22, 2008 8:27 AM
  • Are you using some datetime on your code. can you paste your full code as error message is like some regional setting change in date or currency etc.

     

    Best Regards,

    Imran

     

    http://microsoftcrm3.blogspot.com

     

    Wednesday, January 23, 2008 6:12 AM
    Moderator
  • ok thank you ,I have found the pb
    it was concerning the id quote and lookup
    a difference I have found comparing to java is the errors exceptions
    with java you have a real detailed errors
    Wednesday, January 23, 2008 8:24 AM
  • Its nice to see.. Yes I was thinking something different calling on lookup etc.

     

    as there is code difference of CRM & Java calls.

     

    I do agree with you regarding java details errors.. but here Soap exception will give you also this.

     

     

    Regards,

    Imran

    http://microsoftcrm3.blogspot.com

     

     

    Wednesday, January 23, 2008 2:18 PM
    Moderator