Media Objects


Active Member
Even though our production is currently on Cum 1, the following question refers to Xe.

I am developing a custom application that will wrap around the standard A/R module. I have a custom table built that ties to an A/R Invoice Document. For this table, I need 2 media objects, both of which are text. Both text media objects are read only and will be populated from extraneous data I need to pull in from extenal data sources. I can easily write the DLL to retrieve the data I need to populate the media objects, but I'm not sure how to push the text I retrieve into the media object.

I found a bsfn named AppendMediaObjectText and the documentation attached to it states "This function will take the incoming text field and append it to the media object on the form preceded by the system date and time and the user ID that entered the text for the media object." One problem is that I don't need, nor do I want the system date/time and user id prepended to my text. Also, I need to replace any existing text in the media object, not append it.

Any thoughts or ideas? I have done research, I'm not trying to take the lazy way out, I just don't know where to go from here. Any help is appreciated.

Bill Kunneke
City of Orlando Senior Developer

Live: B733.1 SP7.1
Oracle 805 AS400/DB2
Sandbox: XE SP15
Migrating Central Objects to AS400/DB2




Active Member
How did you create the media object?

Live: B733.1 SP7.1
Oracle 805 AS400/DB2
Sandbox: XE SP15
Migrating Central Objects to AS400/DB2


I wrote a UBE to convert text to Media Object for my Manufacturing Router
Operation Attachments (Router Text). All you do is create a UBE over your
input table (in my case I first created a OneWorld table and wrote a quick
Table Conversion to populate it from an Access database where my legacy text
exists) and in the "Do" section perform an insert into table F00165. If you
need to insert carriage returns into your text (as I did) they need to be in
Hexadecimal. There is a business function called "Convert CR and LR to
Hexadecimal" that will give you the Hex values you need. Also, depending on
the type of Media Object Text the Key may be comprised of different elements
which need to be strung together and delimited with the pipe symbol (shift
back slash). Take a look at F00165 and find an A/R record that already has
Media Object Text so you can see how you need to build your key.

Good luck,
Derek Aitken
AS/400 V4R5 XE SP15
Call Orchestrations From Excel – The Easy Way to Make the Orchestrator Work for You.


Re: RE: Media Objects

I tried to move some text to media objects in OW. My problem is I can not insert carriage return. Any body had experience on that, please advice me. Thank

AS400 V4R5, XE, SP16


Legendary Poster
Re: RE: Media Objects

Hi Y.Lin,

First of all, welcome to JDEList Forums!

I do not know, does this help or not.

Check the B7400150 "Convert CR And LR to Hexadecimal" Business Function. This will pass back you the CR and LF characters and you can them concatenate into your string.



P.S.: Sometimes it is useful, to start a new thread for a special issue then open a sub-thread under an older one, where this sub-topic could be a bit off-topic.

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)