Options

Web service for item tracking lines

casanovacasanova Member Posts: 194
edited 2013-09-18 in NAV Three Tier
hi all
I want to develop sales order for header and lines
including for item tracking lines

for sales order, header and lines no problem
but for item tracking lines, i published page 6510 Item Tracking lines
once i add in web reference using this web service it has error message like this
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
- <s:Body>
- <s:Fault>
  <faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Service.WebMetadata.ServiceBrokerException</faultcode> 
  <faultstring xml:lang="en-US">Naming conflict within the Item Tracking Lines object. Fields "Text020" and "Text020" are both transformed to "Text020". Please find new a name for one of those fields!</faultstring> 
- <detail>
  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Naming conflict within the Item Tracking Lines object. Fields "Text020" and "Text020" are both transformed to "Text020". Please find new a name for one of those fields!</string> 
  </detail>
  </s:Fault>
  </s:Body>
  </s:Envelope>

i want to insert serial no or lot no using web service
any clue?
thanks

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    Create a Codeunit and add a function with parameters in insert the serial no.


    CreateReservEntry.SetDates(
      0D, 0D);
    
    CreateReservEntry.CreateReservEntryFor(
      DATABASE::"Item Journal Line",
      ItemJnlLine."Entry Type",
      ItemJnlLine."Journal Template Name",
      ItemJnlLine."Journal Batch Name",
      0,
      ItemJnlLine."Line No.",
      ItemJnlLine."Qty. per Unit of Measure",
      1,
      'Serial no put here',
      'Lot No.');
    
    CreateReservEntry.CreateEntry(
      ItemJnlLine."Item No.",
      ItemJnlLine."Variant Code",
      ItemJnlLine."Location Code",
      ItemJnlLine.Description,
      ItemJnlLine."Posting Date",
      ItemJnlLine."Document Date",
      0,
      2); 
    

    Change the ItemjnlLine with sales line variable.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    aadamsaadams Member Posts: 19
    I know this is an old post, but I'm facing the same issue. We are using webservices to insert sales invoices and would like to insert the serial no at the same time. Is a codeunit really the only way? This seems like a NAV bug that should be fixed.

    For us, we do not have a dev license, so cannot create a codeunit. What is our option now? Is there a canned codeunit that we can import?
  • Options
    ara3nara3n Member Posts: 9,255
    You'll need a solution center to do the dev work. Shouldn't take more than half an hour.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.