Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field type changing #1090

Open
vlad-ivanov-d opened this issue Oct 17, 2017 · 3 comments
Open

Field type changing #1090

vlad-ivanov-d opened this issue Oct 17, 2017 · 3 comments
Milestone

Comments

@vlad-ivanov-d
Copy link
Contributor

Hello,

Do you support an availability of changing a field type? If yes, I've found a little bug:
When I try to change the field type from "Text" to "Note" if fails with an exception:

field or property "NumberOfLines" doesn't exist

It looks like SPMeta2 tries to set a property "NumberOfLines" on "Text" type field and fails because of such property doesn't exist. This property is only actual for "Note" field type. So SPMeta2 should change field type from "Text" to "Note", and then set properties.

I use SharePoint 2016 On-Premises, CSOM, and SPMeta2.CSOM.Foundation v1.2.130

Field definition:

public static NoteFieldDefinition Coordinates()
{
    return new NoteFieldDefinition
    {		
        Id = new Guid("7d021794-f805-4a5f-ad10-95892b68a522"),
        Title = "Coordinates",
        InternalName = "Coordinates",
        Group = ".Test",
        AddFieldOptions = BuiltInAddFieldOptions.AddToAllContentTypes,
	EnforceUniqueValues = false,
	NumberOfLines= 6
    };
}
@avishnyakov
Copy link
Contributor

No, unfortunately changing field types isn't supported right now.

There are a few tickets related to this:

In a nutshell, it's a complex operation from both implementation and testing. Plus it might turn out in a data loss or corruption.

On a radar, might happen in a few month from now depending on the current workload.

@vlad-ivanov-d
Copy link
Contributor Author

Oh, I see. It will be good. Thank you for so fast reply!

@avishnyakov
Copy link
Contributor

Not a worry. We might do that mid-November.

@avishnyakov avishnyakov added this to the backlog milestone Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants