Export objects through code

Does anyone have a way of exporting objects via code? Is it possible? Or can this be done from CFRONT?

It can be done. See for example these threads: http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=6177&SearchTerms=export,objects,code http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=2446&SearchTerms=export,objects,code http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=4230&SearchTerms=export,objects,code

Heinz, This will import and export one object at a time. Good, it works but how can I export/import more than one object?

What exactly are you trying to do, Connull? If you need to export more than one object, simply let the report run over all the required objects. If, however, you want all those objects in a single file, it gets more tricky, especially during re-import… [;)] Please note that exporting objects from C/AL is not the same as exporting them from the object designer!

Yes Heinz, that exactly what I want to do - export an ‘object pack’. Have you been able to do this? I think I’ve thought of a way to do it - by storing information in a table.

No, I haven’t - but then, my own requirements were a bit different (I had to export the objects as text to do some comparisons etc.), so I didn’t even try to… How are you going to re-import the objects, if all the BLOBs are packed together in a single file?

Is there a way to export the objects as flat TEXT file via the C/FRONT API ? In that case that would be easy to run a compare between 2 versions of the same objects.

Heinz, How do you export the objects as text?

There is currently no way to export objects as text automatically …

quote:


Originally posted by CMDunbar
Heinz, How do you export the objects as text?


Erm… Using the object designer… [:I] My original problem was to export all objects as text. Now, since our DB contains a lot of objects which we have not licensed, doing this manually turned out to be a nightmare. Mark all objects - export them as text - error on first unlicensed object - unmark this object - export them as text - error… and so on and so forth [xx(] The solution was a report which marks all licensed objects with a special character in the version list. This allows for easy filtering and export. AFAIK, there is no way to export objects as text using C/AL.

I think I need to re-assess the situation. [;)] The marking in the version list idea is a good solution - thanks