web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to solve "Invalid memo format" (SDK)

(0) ShareShare
ReportReport
Posted on by

I'm trying to copy a memo attribute metadata in a CRM and trying to paste this in other CRM. But always I get a "Invalid memo format" exception. How can I avoid this?

I'm trying this basic code:

memo = new MemoAttributeMetadata(((MemoAttributeMetadata)attribute).SchemaName) {
                                        MaxLength = ((MemoAttributeMetadata)attribute).MaxLength,
                                        RequiredLevel = ((MemoAttributeMetadata)attribute).RequiredLevel,
                                        IsAuditEnabled = ((MemoAttributeMetadata)attribute).IsAuditEnabled,
                                        Format = ((MemoAttributeMetadata)attribute).Format,
                                        Description = ((MemoAttributeMetadata)attribute).Description,
                                        DisplayName = ((MemoAttributeMetadata)attribute).DisplayName,
                                        MetadataId = ((MemoAttributeMetadata)attribute).MetadataId,
                                        IsSecured = ((MemoAttributeMetadata)attribute).IsSecured,
                                        IsValidForAdvancedFind = ((MemoAttributeMetadata)attribute).IsValidForAdvancedFind
                                    };

CreateAttributeRequest CAR = new CreateAttributeRequest {
                                    EntityName = ent.LogicalName,
                                    Attribute = memo
                                };

Service.IOrganizationService.Execute(CAR);

Note: I already tried to change Format attribute to Text for example, and continue to do Invalid memo format.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kjeld Poulsen Profile Picture
    180 on at

    I had same issue, fetching metadata from one CRM instance to create same field in another instance. (could not use solution copy for different reasons.)

    The MemoAttributeMetadata comming out of the source instance had Format type Text, so manually changing this to TextArea before creating in the destination instance solved the problem. I am not sure why Memo metadata is returned with wrong format type, but at least this solved the problem.

    var x = (MemoAttributeMetadata)a.Attr;

    x.Format = StringFormat.TextArea;

    now use the x in the CreateAttributeRequest and it will work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans