Problem getting xml variable to table

KisuKisu Member Posts: 381
Hmm I have little problem with purchase line import still, I got all header values imported and for the line (line no, no, type, line type, quantity etc.) but I cant get direct unit cost in to the table somehow.

Here is the code which I'm using currently. There is just little conversion as the cost is 200.00, I change it to 200,00 as decimal. str=text var, dec=decimal var

entryRowNetAmount - Import::OnAfterAssignVariable()
str := CONVERTSTR(entryRowNetAmount,'.',',');
EVALUATE(dec,str);
"<Purchase Line>"."Direct Unit Cost" := dec;

Any info what issues could cause that the decimal value wont save in the table.
MESSAGE('%1',dec); gives 200 as it should be in decimal...

cheers for anyhelp before hand
K.S.

Answers

  • KisuKisu Member Posts: 381
    Ok now I cant figure how it dissapears, debug shows it goes to the table as the 4 other lines after, but when the xml port has processed the Direct unit costs wont stay on the lines.. ](*,)
    K.S.
  • MBergerMBerger Member Posts: 413
    Most obvious question : Do you also call Modify on the purchase line ?
  • NixPtNixPt Member Posts: 19
    check the format i have a problem whit hours when i export in xml/format the nav puts one hour less.
  • kinekine Member Posts: 12,562
    NixPt wrote:
    check the format i have a problem whit hours when i export in xml/format the nav puts one hour less.
    It is because the time in the XML is in Greenwich time... ;-
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • KisuKisu Member Posts: 381
    MBerger wrote:
    Most obvious question : Do you also call Modify on the purchase line ?

    Hmm didnt have modify there, but after I put it, it didnt help. I'm gonna go through the debug once more if I see the bug
    K.S.
  • KisuKisu Member Posts: 381
    I located the problem,

    in the xml file direct unit cost was before account no and when I took the DUC in it was writen in the table until the account no.

    When you give account no for the line it clears some certain fields and DUC is one of em \:D/


    It didn't came on my mind before I did and redid the import one after another #-o

    Thanks anyways even the tips didnt clear it up
    K.S.
  • NixPtNixPt Member Posts: 19
    kine wrote:
    NixPt wrote:
    check the format i have a problem whit hours when i export in xml/format the nav puts one hour less.
    It is because the time in the XML is in Greenwich time... ;-

    And i'm To...
Sign In or Register to comment.