on 05-01-2009 10:26 AM
Hello Everyone
I'm trying to copy an Item object (OITM) from one company to another.
i'm loading the item to the instance through GetByKey function (after it been initialized by the original company instance) but i'm confused about how can i add it to a diffrent company, with all the info held within (of the item).
Blessings
Robert
Dear RobertHague,
I think just open the file then copy/ paste it.
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear RobertHague,
Could you show one xml file of the item for check?
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Robert,
You could save the item as XML file (SaveXML method). Then, call the GetBusinessObjectFromXML method to load this item into memory again.
For more detailed information including code samples, see the SDK Help Center
"Exchanging Data Using the DI API XML Capabilities"
or code samples provided with the SDK package.
Hope this information helps.
Kind Regards,
Friederike Mundt
SAP Business One Forums Team
Edited by: Paul Finneran on Jun 9, 2009 2:34 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the advice.
I did saved the object as XML file, but when i'm trying to upload it back to an Items object:
oItems = ((SAPbobsCOM.Items)(globals.oCompany.GetBusinessObjectFromXML(XMLfilePath, 0)));
i'm getting a very long exception error, in this shape (it's just the beginning of him):
<ErrorList>
<Error>System Id = 143853424, Line Number = 1, Column Number = 79, Description = The namespace of element 'schema' must be from the schema namespace.</Error>
<Error>System Id = 143853424, Line Number = 1, Column Number = 99, Description = The namespace of element 'element' must be from the schema namespace.</Error>
<Error>System Id = 143853424, Line Number = 1, Column Number = 112, Description = The namespace of element 'complexType' must be from the schema namespace.</Error>
<Error>System Id = 143915240, Line Number = 1, Column Number = 117, Description = The namespace of element 'all' must be from the schema namespace.</Error>
<Error>System Id = 143915240, Line Number = 1, Column Number = 164, Description = The namespace of element 'element' must be from the schema namespace.</Error>
<Error>System Id = 143915240, Line Number = 1, Column Number = 177, Description = The namespace of element 'complexType' must be from the schema namespace.</Error>
<Error>System Id = 143915240, Line Number = 1, Column Number = 187, Description = The namespace of element 'sequence' must be from the schema namespace.</Error>
<Error>System Id = 143915240, Line Number = 1, Column Number = 239, Description = The namespace of element 'element'
do you have any idea why is that?
Thanks alot!
Robert
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.