Document type issue on Importing PO's

kamranshehzadkamranshehzad Member Posts: 165
Hi I am getting document type issue on importing the documents

it says idnetification fields and values
Document type ='Quote', No.= '104800'

if i dont specify document type in xml, it brings it as quote and if i specify it , then it gives error.

Any idea?

regards,
KS

Answers

  • DenSterDenSter Member Posts: 8,304
    You can set a filter on the right document type in the table element, which will set it for you when importing records. Make sure that you include the document type as one of the linked fields in the line table element.
  • kamranshehzadkamranshehzad Member Posts: 165
    Ill try this.
    Also If you can guide me how can I get the next sequence no ( po / pi ) if i dont want to use manual numbers?

    regards,
    KS
  • kamranshehzadkamranshehzad Member Posts: 165
    Setting up filter property didn't work on XML Port.
    I specified ReqFilterFields = Document Type
    and ReqFilterHeading = Order

    for both table elements in XMLPORT.


    The xml seems fine and I dont see a reason why is it doing so.
    I am specifying the document type for header n lines and there is link in xml port too.

    please advise.

    regards,
    KS
  • DenSterDenSter Member Posts: 8,304
    I didn't mean setting up req. filter fields for the request form. I meant set up a filter on the field in the table element, in the SourceTableView property.

    If your incoming XML doesn't have an order number you're going to have to program access to the numbering series yourself, whether you want to or not is not relevant :). What I usually do is import into temp records and program the creation of the order in the OnPostXMLPort trigger. I guess I'm just not very good at XMLPorts and that's the only way I can have total control over what is imported and how it is imported.
  • kamranshehzadkamranshehzad Member Posts: 165
    thanks that worked. I am new to navision thats why coming across these basic things.

    I just wanted to use automated number as it will be useful during the po transfers from our other system to navision..

    Ill see what can be done.

    regards,
    KS
  • kamranshehzadkamranshehzad Member Posts: 165
    A strange thing is happening now. I am importing the same PO using a codeunit exposed as webservice but it started giving me same error again.

    idnetification fields and values
    Document type ='Quote', No.= '104800'

    any idea why is MISBEHAVING when it is exposed as webservice?
    
    ImportNewPO ( xmlData : bigtext) status : boolean
    
    IF XmlData.LENGTH > 0 THEN BEGIN
       CLEAR(TmpRecord); // clear temp  record
    
       TmpRecord.Blob.CREATEOUTSTREAM(XmlOutStream); // create output stream for temp record
       XmlData.WRITE(XmlOutStream); // write into temp record
    
       TmpRecord.Blob.CREATEINSTREAM(XmlInStream); // read from temp record
       
       XMLPORT.IMPORT(123456754,XmlInStream); // import into system using xmlport
       CLEAR(TmpRecord); // clear the temp record
    
       Status := TRUE; // return true
    END
    
    

    regards,
    KS
  • DenSterDenSter Member Posts: 8,304
    What do you mean "misbehaving"? Things generally behave exactly the way that they are programmed. What exactly is the full error message?
  • kamranshehzadkamranshehzad Member Posts: 165
    idnetification fields and values
    Document type ='Quote', No.= '104800'

    this is the same thing that i was getting instart and then i set up the filter on field SourceTableView and reading from file was fine. Now I am getting a stream in (the code is in previous post) and its throwing the same error.

    any idea?

    regards,
    KS
  • kamranshehzadkamranshehzad Member Posts: 165
    Done it my stupidity. I was not linking SourceTableView links for doucment type as well. its working now. great.

    What I meant by misbehaving that it was not working for me. so i was just kidding about it.


    thanks.
    KS
  • DenSterDenSter Member Posts: 8,304
    I am happy to hear that you solved the issue. One thing though. The error message that you posted:
    idnetification fields and values
    Document type ='Quote', No.= '104800'
    That is not the entire error message, it is only the part where it identifies the record that was causing the error. Next time that you have an issue, please post ALL of the error message. You can simply do Ctrl+C when the error message is on your screen to copy the whole thing.
  • kamranshehzadkamranshehzad Member Posts: 165
    Thanks. Thanks for clarifying that its not a error message.

    I wasn't able to copy paste it as I was getting it in my .net based test application.

    thanks for your help. You guys are doing a great job.

    regards,
    KS
Sign In or Register to comment.