locked
personinfo.selectedrecord RRS feed

  • Question

  • I am getting a object reference error when using personinfo.selectedrecord.newitem(abc).what am trying to do is to send ccr(xml) to healthvault.can anyone help me?

     

    Thanks

    AJ

    Friday, April 1, 2011 5:01 AM

Answers

  • Hello ,

    I am assuming that you might not instantiate the object of HealthRecordItem correctly. You can use the below code snippet for uploading CCR file to HealthVault.

    void UploadCCR()
        {
            Guid CCR_THING_GUID = new Guid("1e1ccbfc-a55d-4d91-8940-fa2fbf73c195");

            XmlDocument ccrDoc = new XmlDocument();

            ccrDoc.Load(@"E:\HealthVaultSamples\ExampleCCR.xml");

            HealthRecordItem newCcrItem = new HealthRecordItem(CCR_THING_GUID, ccrDoc);

            PersonInfo.SelectedRecord.NewItem(newCcrItem);

        }

    Hope this helps and let me know if you have any further issues.

     

    Regards,

    Madan Kamuju

    • Proposed as answer by Madan kamuju Monday, April 11, 2011 1:12 PM
    • Marked as answer by Aneesh D Wednesday, May 25, 2011 4:55 PM
    Friday, April 1, 2011 9:15 AM