Adding userGroup to subsite in sharepoint online using javascript

I want to add a user group to sharepoint subsite using javascript. I have used follwing code and it added a user group to subsite(ABS). and it also added user group to the parent site(OMSTest) which is a root sitecollection. why is that?

function CreateUserGroups(url)   {        var siteUrl = '';     var context = new SP.ClientContext(siteUrl);     var currentWEB = context.get_web();          var membersGRP = new SP.GroupCreationInformation();        var membershipArray = [];       var collContribute = SP.RoleDefinitionBindingCollection.newObject(context);      var rdContribute = currentWEB.get_roleDefinitions().getByName("Contribute");       collContribute.add(rdContribute);         membersGRP.set_title("GROUPP1");       membersGRP.set_description("GROUPP1");       var oMembersGRP = currentWEB.get_siteGroups().add(membersGRP);      oMembersGRP.set_allowMembersEditMembership(false);     oMembersGRP.set_onlyAllowMembersViewMembership(false);        var assignments = currentWEB.get_roleAssignments();     var roleAssignment = assignments.add(oMembersGRP, collContribute);        oMembersGRP.update();       membershipArray.push(oMembersGRP);               context.load(membershipArray[membershipArray.length - 1]);       //clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded2), Function.createDelegate(this, this.onQueryFailed2));      context.executeQueryAsync(           function () {                     alert("Group Created Successfully");           },           function (sender, args) {                           alert("Failed to create groups " + args.get_message());                       }); } 

Using Transactions To Rollback SSIS package

I’m at a loss with an SSIS package I inherited. It contains: 1 Script Task 3 Execute SQL tasks 5 Data flow tasks (each contains a number of merges, lookups, data inserts and other transformations) 1 file system task of the package.

All of these are encapsulated in a Foreach loop container. I’ve been tasked with modifying the package so that if any of the steps within the control/data flow fails, the entire thing is rolled back. Now I’ve tried two different approaches to accomplish this:

I. Using Distributed Transactions.

I ensured that:

MSDTC was running on target server and executing client (screenshot enclosed) msdtc.exe was added as an exception to server and client firewall Inbound and outbound rules were set for both server and client to allow DTC connections. ForeachLoop Container TrasanctionLevel: Required All other tasks TransactionLevel: Supported My OLEDB Connection has RetainSameConnection set to TRUE and I’m using SQL Server Authentication with Save Password checked

When I execute the package, it fails right after the script task (first step) After spending an entire week trying to figure out a workaround, I decided to try SQL Tasks to try to accomplish my goa using 3 Execute SQL Tasks:

BEGIN TRAN before the foreach loop container COMMIT TRAN After the ForeachLoop Container with a Success Constraint ROLLBACK TRAN After the ForeachLoop Container with a Failure constraint

In this case, foreachloop container and all other tasks have TransactionLevel property set to Supported. Now here, the problem is that the package executes up to the fourth data flow task and hangs there forever. After logging into SQL Server and verifying the running sessions, I noticed sys.sp_describe_first_result_set;1 as a headblocker session

Doing some research, I found it could be related to a few TRUNCATE statements in some of my Data flow tasks which could cause a schema lock. I went ahead and changed the ValidateExternalMetaData property to False for all tasks within my data flow and changed my truncate statements to DELETE statements instead. Re-ran package and still hangs in the same spot with the same headblocker. As an alternative, I tried creating a second OLEDB connection to the same database, assigned that new OLEDB Connection to my BEGIN, ROLLBACK and COMMIT SQL tasks with RetainSameConnectionProperty set to TRUE and changed the RetainSameConnectionProperty to FALSE (and tried it with TRUE as well) in the original OLEDB connection (the one used by the data flow tasks). This worked in the sense that the package appeared to execute (It ran and Commit Tran executed fine) and then I ran it again with a forced error to cause it to fail and the Rollback TRAN task executed successfully, however, when I queried the affected tables, the transaction hadn’t rolled back, all new records were inserted and old ones were updated (the begin tran was clearly started in a different connection and hence didn’t affect the package’s workflow). I’m not sure what else to try at this point. Any help would be truly appreciated, I’m about to go nuts with this!

P.S. additionally, all objects have “DelayValidation” set to true on everything and SQL Server version is 2012.

Causing infinite loop for SharePoint 2010 Approval Workflow using SharePoint Designer

I’m trying to setup an approval workflow for new and edited items in Document Library.

I created an approval workflow that is set to start when a new item is created and when an item is edited. The workflow updates the approval status on completion.

Now when I create a new item or edit an existing item the workflow kicks off as expected. However when I approve the workflow the workflow completes and then starts a new workflow. It would seem that updating the approval status is causing the workflow to activate again.

Is there any workaround to stop this looping?

Get data from multiple lists using REST API

My requirement is:

To pass listnames as an array to a method and concatenate the result after each success.

The problem is I’m not able to concatenate the result from the previous ajax call

handleClick = (ListName) => {     var reactHandler = this;      jquery.ajax({         url: this.props.siteUrl+ "/_api/web/lists/getbytitle('" + ListName + "')/items" ,         type: "GET",         headers:{'Accept': 'application/json; odata=verbose;'},         success: function(resultData) {           ///logic???          });            }         },         error : function(jqXHR, textStatus, errorThrown) {         }     });    } 

How to connect to a database in SQL Sever Management Studio (SSMS) using Microsoft OLE DB Provider for SQL Server

After asking this question, I realized that the true slowness comes from SQL Server Engine, and I used tons of things and still no success.

However, I created a connection.udl file on desktop and tried to connect to my localhost via different providers and via different connection string combinations.

I realized that when I use localhost instead of . and use Microsoft OLE DB Provider for SQL Server, the connection is almost instantaneous and truly fast.

Now I want to be able to connect to SQL Server via SSMS using that provider. But I don’t know how. Could you please help.

How can I login in SSMS, using ‘Microsoft OLE DB Provider for SQL Server’?

Using cards as navigation to other cards

I am trying to become good at web design, but feel I am missing that ‘visual eye’ that so many of you have.

The general flow of what I’m trying to make is a top level subject (ex. Math), will bring you to a page of its categories (ex, Linear Algebra, Calculus, Discrete Math… and so on). You can then click on one of those categories to bring you to the actual content/tutorial/blog page itself (which will have a left side nav for different parts of the category). Some example on the side-left nav might if you click on Calculus might be .. integrals, etc etc).

I want to make a page where I will have multiple top-level subjects, all in their own card with an icon (and maybe a description). I’ve been stuck on this for a long time.

View post on

  1. What comes next when you click on a major subject (ex. Math)? Another page with 5-15 minor-subject (Calculus, Linear algebra etc..). Can they go in cards ? Surely they must look a little bit different. I feel like clicking on a page with 4 cards, and going to a page with 10-15 cards would look repetitive and bad.

  2. I only have 4 “Main subjects” so there is a lot of white space below. Maybe I need a a light gray/blue background image on part of the page?

I am thinking about making those 4 cards a little bit bigger… and the next page they lead to have 10-15 cards about the original size of the 4 cards. Any feedback would be greatly appreciated!