DI API - Retrieve specific message object when you already have the code?

The MessagesService object lets you retrieve a message using the message header. It also lets you retrieve a list of message headers from the inbox or sent mail.
Unfortunately, I don't see any way to create a single message header if I already know the code. The MessageHeaders collection has an Add method for a single MessageHeader but there does not appear to be a public constructor for the MessageHeader object.
Trying to create a new message header like
oMsgHeader = new MessageHeader();
or
oMsgHeader = new MessageHeaderClass();
both compile but cause a COM exception when actually executed.
So, other than retrieving all of the message headers and finding the message I want is there any way to retrieve a specific message when the key (Code) is known?

Dear William Faulk,
My previous reply is not accurate. The MessageHeader can initialized by Inbox our Outbox but can not to initialize a single message header individually by now.
So the code will as follows
For i = 0 To oUserInbox.Count - 1
    oMessageHeader = oUserInbox.Item(i)
    If oMessageHeader.Code = "myKey" Then
        oMessage = oMessageService.GetMessage(oMessageHeader)
    End If
Next
Best Regards
Jane Jing
SAP Business One Forum team

Similar Messages

  • When you can have the download for adobe flash on ipad

    when you can have the download for adobe flash on ipad

    I was astounded, to say the least, that something as basic as playing a Utube video doesn't work on the iPad out of the box. I tried it on my iPad3 and it didn't even give me an error message. The iPad just didn't do anything.
    Sure it does with a YouTube app included.
    MS is coming out with what I'm hearing is a real winner in the Fall. I'll wait and see.
    You heard this where?
    http://macdailynews.com/2012/06/19/zdnet-sr-tech-editor-perlow-microsofts-surfac e-has-catastrophe-written-all-over-it/
    http://macdailynews.com/2012/06/08/zdnets-kingsley-hughes-microsofts-windows-8-i s-an-awful-horrible-painful-design-disaster/
    http://macdailynews.com/2012/06/22/why-i-love-microsofts-vaporware-surface-table t/
    http://macdailynews.com/2012/06/22/microsofts-surface-tablet-said-to-be-wi-fi-on ly-at-launch-no-4g-no-3g-no-2g-not-even-1g/
    http://macdailynews.com/2012/06/19/fox-news-copier-microsoft-is-doomed-to-fail-w ith-surface-tablet/
    http://macdailynews.com/2012/06/03/dvorak-windows-8-an-unmitigated-disaster-unus able-and-annoying-it-makes-your-teeth-itch/

  • HT3702 Has anyone else had itunes take the money for a purchase out of you bank account when you already have enough money as a credit on your itunes account?

    Has anyone else had itunes take money for a purchase out of your bank account when you already have a credit on your itunes account to cover it?

    acuna matata wrote:
    Dear Carolyn
    I tried to forward the email to [email protected] but it was rejected saying that that email address was not recognised. Please could you recheck and let me know
    Thankyou
    Acuna matata
    It should be [email protected] You left out a letter.

  • Extension manager says I need a newer version of photoshop when I already have the most current version cc2014

    extension manager says I need a newer version of photoshop when I already have the most current version cc2014. Any thoughts on this?

    lance have you found an answer to your question?

  • TS3694 im trying to restore my iphone and itunes doesnt allow it to restore without updating. problem is that i have the latest update on my iphone so why is it forcing me to wait for a 7hr update download when i already have the update and only need to r

    im trying to restore my iphone and itunes doesnt allow it to restore without updating. problem is that i have the latest update on my iphone so why is it forcing me to wait for a 7hr update download when i already have the update and only need to restore?

    Sadly, the iPhone 3G can not be upgraded beyond iOS 4.2.1.

  • Current iLife needs updating, but don't want to pay for the latest versions when I already have the actual application

    I got a MacBook a couple of years a go and it was pre-downloaded with iLife 09.  I already downloaded the latest software (OS X Mountain Lion) and now I would like to update these to the most current versions out there (the ones in the Mac App Store) but I don't want to spend $15 per app when I already have the applications.  Is there a code that will allow me to just update the most current versions?  That would help most definetly.

    No. There is no upgrade discount.
    (84962)

  • Why do my new songs show up with a duplicate to download from Itunes when I already have the song

    Recently I;ve noticed a lot of duplicates showing up in my library, they have the cloud icon next to them indicating I have the song waiting to be downloaded but I already have the song.  Once upon  a time, we could isolate duplicate songs in our library and delete them.  Why is this happening?  How do I stop it?  Will I lose both if I delete the "cloud" one?

    Go to preferences.Go to store .UNCHECK  show itunes in cloud purchases.Click OK.I had this happen.you should not lose your songs.I did not lose mine.I believe you are merely hiding the cloud song from view.Did you "bite"at the pop-up to update itunes software.I did.That may be the culprit.

  • Downloading the Creative Suite when I already have the serial number?

    Hi,
    I have already got the creative suite on one of my laptops (it has been paid for), but i want to download the creative suite on my new laptop, I already have the serial number.. but how do I do this?

    Bethanjames which version of Creative Suite are you wishing to download?  You can find links to most versions at Other downloads.

  • BW web reports when you already have an ESS portal

    Hi. Here is the situation.
    I have NW2004s portal serving ESS content from an ECC backend.
    I just intstalled a BW NW2004s system. The BW people want to use BEX web queries.  What is the best way to provide this content?
    Also If I wanted to use JUST ONE PORTAL, but still get the newest BW WEB functionality, how can this be done?
    Thanks

    Hello Jeremy,
    Just install the BI-Java stuff with JSPM.
    Be careful of the potential load in your Production Portal.
    Go to SAP Marketplace and just select the components you don't already have in the BI-Java area of NW2004s.
    Of course you will need to configure the connectivity and SSO (2 ways) between your Portal and BI.
    Use the NWA after you deploy the BI-Java components as it is the simplest way to acheive the config. Some steps might not work automatically but at least you will know what to do (http://portal.xyz.com:50000/nwa - Then use the last tab).
    Regards,
    Marc.

  • TS1292 what do you do when you scratch off the code on accidently.

    I bought Itunes piont from a gamestop in ann arbor. Then I got home I grabed a coin to scratch of the one thing that covers the code and accidently some how scratch off the code. So can you please help me the serial number is GCA0067735264158. I hope that help so please can you help me.  

    iTunes Store: Invalid, inactive, or illegible codes
    You should not leave the serial number on a public forum.  Now everyone has your serial number.

  • Upgrading Flash Player when I already have the latest verison installed on my computer

    I have the latest verison of Adobe Flash Player on my computer which is Adobe Flash Player 11 Active X  ( verison 11.9 ) and also I have Adobe Flash Player 11 Plugin and while playing Farmville2 on Facebook, I am asked to download or upgrade my Adobe Flash Player. I have already been asked 3 times in the 45 mintues to upgrade my Player. Is this really neccessary that many times??

    You need to clear your browser cache and history so that the "cookie" which indicates a lower version isn't sent to Facebook.

  • Why do I get a message to install Adobe Flash when I already have the latest version?

    Certain websites will not let me enter unless I install the latest Adobe Flash, but when I do so I still get the same message, even after re-booting?

    you don't need a cc subscription to use the purchased copy.
    download the installation file and use your serial number to activate when given the licensing option during installation.  you should install 5.7 instead of installing 5.0 and updating.
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
    window using the Lightroom 3 link to see those 'Important Instructions'.

  • How do i fix the message to update java deployment kit when I already have the lastest version of java installed?

    I keep getting a message that "An important update is available for Java Deployment Toolkit 7.0.400.43". I click on "Update Now" and I get taken to the Mozilla Plug-in check page. A brief message shows at the top of the page that tells me some plugins are out of date and then disappears. The plugin checks show all plugins are up to date. I have uninstalled/reinstalled Java more than once and run a registry cleaner, but once I install Java the same messages appear. I am on a Windows XP machine and I am running an older version of Firefox (9.0) because addons for some of my other software don't work with newer versions of firefox. Can I get rid of the message or do I have to live with it because I use an older version of firefox?

    Please update to Firefox 23.0.1 IMMEDIATELY. Old versions are extremely vulnerable to security issues, and all your add-ons should work if they work in Firefox 10 anyway.

  • Is it possible to install GB2 when you already have GB3 running?

    Does anyone know if it is possible to have both versions of GB running on a single computer... if not, is it possible to downgrade to version 2 from version 3.
    Thanks!!
    Dave

    If you rename the GB app, you might be able to install GB2, but I can't say for certain what the GB2 installer will do, I don't know if it will complain).
    (I have all versions from 1.1 to 3.0.2) on my machine, but I never tried to install an older version, it was always a case of installing the newer version while keeping the older one)

  • How to move from lightroom 5 to 6, when you already have creative clond?

    Is it an upgrade?  A new purchase?  I am confused.

    See related forum thread:
    I have Creative Cloud for Photographers. How do I get Lightroom CC?

Maybe you are looking for

  • N9 Mail for Exchange: Calendar sync incomplete

    Hi all, I've set my N9 (64 GB, PR1.3) to sync with Outlook Exchange 2010. Everything used to work nicely, but recently I discovered that not all calendar entries are synced to my device. Some appointments that show up in Outlook (and on other devices

  • Quantity Total Stock is incorrect in the report

    0TOTALSTCK (Quantity Total Stock) is a non-cumulative key figure in the standard cube 0IC_C03 (Material Movements). The user is running a report for September month (01.09.2008 to 30.09.2008). At the end of the month i.e., 30.09.2008 the total stock

  • Fetching data into a data grid or data table

    Post Author: Mohd. Amir CA Forum: .NET I want to fetch data from ci_appobjects into my web page. How can I do it??? Data is like number of universes present in the repository, etc

  • PayPal Buy Now Button Problem

    I have a Photography site that uses the BUY NOW buttons from the PayPal ecommerce tool kit extension. Each of the "buy" pages have the same info for purchasing. I recently upgraded to 8 (pc, XP Home Edition), since then, when I copy/paste my "buy now

  • Administrator login information error

    In setting up my niece's new MacBook Pro, I apparently mistyped her chosen password the same way twice. Now, we cannot install software updates because we are told the information is incorrect. Short of returning the computer to Apple, is there anyth