Web Service: Parameter 'X' is empty

ian_schoian_scho Member Posts: 5
edited 2015-04-02 in NAV Three Tier
I've not seen this error on the forums (excluding the Parameter 'X' is Null post).
System.Web.Services.Protocols.SoapException: Parameter Currency_Code is empty
   en System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
I am consuming a Page, based on the 'Sales Price' entity, from VS and am attempting to Read a row which contains a lot of values for the table key... One of which is an empty string, the currency value.
// NAV 2009 R2
com.somecompany.wsSalesPrice.wsSalesPrice objSP = service.Read(
                "X6809BB",
                SalesPrice_SalesType.CustomerPriceGroup.ToString(),
                "NORAUTO",
                dtStart,
                String.Empty,   //null,           // Currency
                String.Empty,   //null,           // Variant
                "UDS",
                0);
Any ideas?

Comments

  • vremeni4vremeni4 Member Posts: 323
    Hi,

    I think you have to define a variable for Currency and Variant and use it in the function call.
    String Variant=new string(" "); 
    String Currency=new string(" ");
    // NAV 2009 R2
    com.somecompany.wsSalesPrice.wsSalesPrice objSP = service.Read(
                    "X6809BB",
                    SalesPrice_SalesType.CustomerPriceGroup.ToString(),
                    "NORAUTO",
                    dtStart,
                    Currency,   //null,           // Currency
                    Variant,   //null,           // Variant
                    "UDS",
                    0);
    

    I hope this helps,
    Thanks.
Sign In or Register to comment.