Ejemplo n.º 1
0
        public void CreateListWFs()
        {
            string tenant         = "https://networkintegration.sharepoint.com/sites/365Build/Watersun";//"https://mytenant.sharepoint.com/sites/test";
            string userName       = "******";
            string passwordString = "187Ch@lleng3r";
            string listName       = "Test1234567";
            //string wfAssoc = "05639090-c09B-478A-B1F8-611718539D7F";//"05639090-c09b-478a-b1f8-611718539d7f";

            GlobalLogic   gl  = new GlobalLogic();
            ClientContext ctx = gl.ConnectSP(tenant, userName, passwordString);



            try
            {
                if (gl.createList(ctx, listName))
                {
                    if (gl.createListColumns(ctx, listName))
                    {
                        if (gl.createListView(ctx, listName))
                        {
                            Guid guid = gl.getListGuid(ctx, listName);
                            if (guid != Guid.Empty)
                            //if (gl.getListGuid(ctx, listName) != Guid.Empty)
                            {
                                gl.addWorkflowSubscription(ctx, listName, guid);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }