0

I have a InfoPath form published in SharePoint 2010. The form contains various fields which are published as Metadata in Library.

But all the fields are displaying as Read Only and I am not able to make that field as editable.

I don't have access to SharePoint Server, I just have SharePoint Document Library and SharePoint Designer.

PS: PowerShell script will not work as I am not having SharePoint Server.

Can any one let me know how can we make field editable that are published by InfoPath in SP2010?

  • 1
    Since you have permission for the document library, please try with CSOM code – TARUN Jun 1 '18 at 6:55
  • So their types are "Manage Metadata", right? – AlexZh Jun 1 '18 at 7:58
0

Thanks Tarun for suggestion.

I ended up using CSOM.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Microsoft.SharePoint.Client;



namespace COM

{

    class Program

    {

        static void Main(string[] args)

        {

            string siteUrl = "http://serverName:46563/sites/MMS-CTH/";



            ClientContext clientContext = new ClientContext(siteUrl);

            Web web = clientContext.Web;

            List list = web.Lists.GetByTitle("CustomList");

            Field field = list.Fields.GetByTitle("Title");

            field.ReadOnlyField = true;

            field.Update();

            clientContext.Load(field);

            clientContext.ExecuteQuery();

            Console.WriteLine(field.Title + " is updated successfully");

            Console.ReadLine();           

        }
    }
}

I found the reference here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.