General journal line

saju007saju007 Member Posts: 7
I write one web service for insert values to General journal line .Page code ID 39 .it works fine but date fields and amount fields values are not saved as intended, always values (decimal) become zeros and date 29-Jan-2010.Anyone please suggest me a remedy for this issue.

Comments

  • eyolfthoeyolftho Member Posts: 18
    How did you insert the data?

    If you use SQL INSERT you must CONVERT the data to the correct type, as in "CONVERT(Decimal, '123.45') or CONVERT(DateTime,'2014-02-26',102)
  • ara3nara3n Member Posts: 9,256
    he mentioned webservice. you need a new page that has all the fields. i would rather create a codeunit and publish it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • saju007saju007 Member Posts: 7
    i try with codeunit 12 and published.. and checked thru internet explorer.

    localhost:7047DynamicsNAV/WS/CRONUS_International_Ltd/services

    working fine and list "GenJnlCodeLine " but

    localhost:7047DynamicsNAV/WS/CRONUS_International_Ltd/CodeUnit/GenJnlCodeLine

    then face issue.

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    <s:Body>
    <s:Fault>
    <faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">
    a:Microsoft.Dynamics.Nav.Service.WebServices.ServiceBrokerException
    </faultcode>
    <faultstring xml:lang="en-US">
    Parameter newGLReg of the type INavRecordHandle in method GetGLReg in service GenJnlCodeLine is invalid!
    </faultstring>
    <detail>
    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"&gt;
    Parameter newGLReg of the type INavRecordHandle in method GetGLReg in service GenJnlCodeLine is invalid!
    </string>
    </detail>
    </s:Fault>
    </s:Body>
    </s:Envelope>
  • ara3nara3n Member Posts: 9,256
    you need to create a new codeunit with parameters in 50000 range. you can't publish standard codeunits.
    Ahmed Rashed Amini
    Independent Consultant/Developer


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