locked
Importing note from Sugar into CRM 2011 won't change created on date or created by RRS feed

  • Question

  • Hi all, is it not possible to import notes into Dynamics and have the Created By user and Created On date maintained?  I have no problem importing records and having them assigned to a user, or importing other date fields.  When I import notes on an account though it always defaults to myself as the owner, and today's date as the created on date.  I can just change the note so that it shows "Created date - Created by - Note" but wanted to check if I'm just doing something wrong first to see if there is a way to properly import notes and have them assigned?  Using Dynamics 2011 with the import wizard, thanks!

    Monday, February 25, 2013 8:47 PM

Answers

  • You can use the OverriddenCreatedOn property of the Annotation object to set the created on date. I have never been able to figure out how to set CreatedBy. I always just end up doing what you said and putting the name before the note text.

    Annotation note = new Annotation
    {
        ObjectId = new EntityReference(Incident.EntityLogicalName, _incidentId),
        OverriddenCreatedOn = vNote.createdtime.ToUniversalTime(),
        Subject = "Ticket Comments",
        NoteText = vNoteOwner == null ?
            String.Format("Unknown author {0:g}: {1}", vNote.createdtime, vNote.comments) :
            String.Format("{0} {1} {2:g}: {3}", vNoteOwner.first_name, vNoteOwner.last_name, vNote.createdtime, vNote.comments),
        IsDocument = false
    };


    Monday, February 25, 2013 9:08 PM

All replies

  • You can use the OverriddenCreatedOn property of the Annotation object to set the created on date. I have never been able to figure out how to set CreatedBy. I always just end up doing what you said and putting the name before the note text.

    Annotation note = new Annotation
    {
        ObjectId = new EntityReference(Incident.EntityLogicalName, _incidentId),
        OverriddenCreatedOn = vNote.createdtime.ToUniversalTime(),
        Subject = "Ticket Comments",
        NoteText = vNoteOwner == null ?
            String.Format("Unknown author {0:g}: {1}", vNote.createdtime, vNote.comments) :
            String.Format("{0} {1} {2:g}: {3}", vNoteOwner.first_name, vNoteOwner.last_name, vNote.createdtime, vNote.comments),
        IsDocument = false
    };


    Monday, February 25, 2013 9:08 PM
  • Hi,

    It is not possible to directly modify these. 

    Check out this blog for more information: http://blogs.msdn.com/b/emeadcrmsupport/archive/2012/08/01/the-truth-about-override-created-on-or-created-by-for-records-during-data-import.aspx


    Gustaf Westerlund, MVP, CEO and Chief Architect at CRM-Konsulterna in Sweden
    Blog: http://gustafwesterlund.blogspot.com
    Swedish Dyn CRM Forum: http://www.crmforum.se

    Monday, February 25, 2013 10:10 PM