Monday, March 13, 2017

Wood Badge

Received The Wood Badge for the second time yesterday. The first time was from Egypt 2002. I am also honored to be invited to join the staff for next course this spring.



For those who don't know what the Wood Badge is, check the below brief:

Wood Badge is the highest and most advanced training course offered by the Boy Scouts of America. While it is rich in scouting history and tradition, participants will spend 6 full days and nights learning modern leadership theories from contemporary scholars such as Ken Blanchard (author of the One Minute Manager series of books), Stephen R. Covey (author of The Seven Habits of Highly Effective People and Principle-Centered Leadership), and Spencer Johnson (author of Who Moved My Cheese). A complete set of references can be found at the end of this document.

Wood Badge has five Central Themes that encapsulate the course content. These are:

  • Living the Values
    • Values, mission, and vision
    • Aims and methods

  • Bringing the Vision to Life
    • Listening to learn
    • Communicating
    • Giving and receiving feedback
    • Valuing people and leveraging diversity
    • Coaching and mentoring

  • Models for Success
    • High Performance Teams
    • Team Development Model
    • Team Leadership Model
    • Situational Leadership

  • Tools of the Trade
    • Project planning
    • Problem solving and decision making
    • Managing conflict
    • Assessing team performance
    • Self-Assessment
    • Managing change
    • Celebrating team success

  • Leading to Make a Difference
    • Leaving a legacy
    • The greatest leadership secret


These workshops are taught through lecture, group discussion, hands on exercises, and through the creation of goals that apply the leadership training received. At the conclusion of the course, attendees will have created at least 5 goals. A counselor will be assigned to work with each attendee for 18 months to ensure application of the training they received and the completion of the 5 goals.

Dr. Blanchard’s courses and workshops, offered through The Ken Blanchard Companies, run $500 per day ($3000 for 6 days). The Boy Scouts of America have negotiated royalty fees and intellectual property rights which allows them to offer the entire 6-day course for just under $230. 

Leaders at many companies (such as IBM, Motorola, and Intel) have recognized the value this training is to their employees. As such, many agree to pay the course fees and/or give time off as part of their employee’s professional development and training plan. Individual company policies vary, however. If you would like additional information, please feel free to contact the Boy Scouts of America, Atlanta Area Council at (770) 989-8820. Or, visit http://www.atlantabsa.org/training/wood-badge/6412.

Wood Badge Training Resources

  • Learning to Lead: A Workbook on Becoming a Leader
    • by Warren Bennis,‎ Joan Goldsmith
    • https://www.amazon.com/Learning-Lead-Workbook-Becoming-Leader/dp/0465018866
  • Managing People is Like Herding Cats
    • by Warren Bennis
    • https://www.amazon.com/Managing-People-Like-Herding-Cats/dp/189000961X
  • Old Dogs, New Tricks: On Creativity and Collaboration
    • by Warren Bennis
    • https://www.amazon.com/Old-Dogs-New-Tricks-CollaborationBennis/dp/1890009342
  • On Becoming a Leader
    • by Warren Bennis
    • https://www.amazon.com/Becoming-Leader-Warren-Bennis/dp/0465014089
  • Why Leaders Can't Lead: The Unconscious Conspiracy Continues
    • by Warren Bennis
    • https://www.amazon.com/Why-Leaders-Cant-Lead-Unconscious-ebook/dp/B00ZDS94K6
  • Leadership by the Book: Tools to Transform Your Workplace
    • by Ken Blanchard,‎ Bill Hybels,‎ Phil Hodges
    • https://www.amazon.com/Leadership-Book-Tools-Transform-Workplace/dp/0688172393
  • Empowerment Takes More than a Minute
    • by Ken Blanchard,‎ John P. Carlos,‎ Alan Randolph
    • https://www.amazon.com/Empowerment-Takes-More-Than-Minute/dp/1576751538
  • The 3 Keys to Empowerment: Release the Power Within People for Astonishing Results
    • by Ken Blanchard,‎ John P. Carlos,‎ Alan Randolph
    • https://www.amazon.com/Keys-Empowerment-Release-Astonishing-Results/dp/1576750604
  • High Five! The Magic of Working Together
    • by Ken Blanchard,‎ Sheldon Bowles
    • https://www.amazon.com/High-Five-Magic-Working-Together/dp/0688170366
  • The Power of Ethical Management
    • by Norman V Peale,‎ Ken Blanchard
    • https://www.amazon.com/Power-Ethical-Management-Norman-Peale/dp/0688070620
  • The One Minute Manager Builds High Performing Teams
    • by Ken Blanchard,‎ Eunice Parisi-Carew,‎ Donald Carew
    • https://www.amazon.com/Minute-Manager-Builds-Performing-Teams/dp/0061741205
  • Leadership and the One Minute Manager - Increasing Effectiveness Through Situational Leadership
    • by Ken Blanchard,‎ Patricia Zigarmi,‎ Drea Zigarmi
    • https://www.amazon.com/Leadership-Minute-Manager-Updated-Effectiveness/dp/0062309447
  • Principle-Centered Leadership
    • by Stephen R. Covey
    • https://www.amazon.com/Principle-Centered-Leadership-Stephen-R-Covey-ebook/dp/B0068SVE9E
  • The 7 Habits of Highly Effective People
    • by Stephen R. Covey
    • https://www.amazon.com/Habits-Highly-Effective-People-Powerful-ebook/dp/B01069X4H0
  • First Things First
    • by Stephen R. Covey,‎ A. Roger Merrill,‎ Rebecca R. Merrill
    • https://www.amazon.com/First-Things-Stephen-R-Covey/dp/0684802031
  • Leadership Is an Art
    • by Max Depree
    • https://www.amazon.com/Leadership-Art-Max-Depree/dp/B0077EEPTO
  • Leadership Jazz
    • by Max Depree
    • https://www.amazon.com/Leadership-Jazz-Revised-Essential-Elements/dp/038552630X
  • Leading Without Power: Finding Hope in Serving Community
    • by Max Depree
    • https://www.amazon.com/Leading-Without-Power-Community-Paperback/dp/0787967432
  • The Team Coach
    • by Donna Deeprose
    • https://www.amazon.com/Team-Coach-Supervisors-Managers-Environment/dp/081447859X
  • Best Practices in Leadership Development Handbook
    • By David Giber, Samuel M. Lam,‎ Marshall Goldsmith
    • https://www.amazon.com/Linkage-Practices-Leadership-Development-Handbook/dp/0470195673
  • Generation We
    • by Eric H. Greenberg,‎ Karl Weber
    • https://www.amazon.com/Generation-We-Millennial-America-Changing/dp/0982093101
  • Servant Leadership: A Journey into the Nature of Legitimate Power and Greatness
    • by Robert K. Greenleaf
    • https://www.amazon.com/Servant-Leadership-Legitimate-Greatness-Anniversary/dp/0809105543
  • Co-Leaders: The Power of Great Partnerships
    • https://www.amazon.com/Co-Leaders-Power-Partnerships-David-Heenan/dp/0471316350
    • by David A. Heenan,‎ Warren Bennis
  • Management of Organizational Behavior: Leading Human Resources
    • by Paul Hersey,‎ Kenneth H. Blanchard,‎ Dewey E. Johnson
    • https://www.amazon.com/Management-Organizational-Behavior-Leading-Resources/dp/0130175986
  • Millennials Rising: The Next Great Generation
    • by Neil Howe,‎ William Strauss
    • https://www.amazon.com/Millennials-Rising-Next-Great-Generation/dp/0375707190
  • Generations: The History of America's Future
    • by Neil Howe,‎ William Strauss
    • https://www.amazon.com/Generations-History-Americas-Future-1584/dp/0688119123
  • Who Moved My Cheese?
    • Spencer Johnson
    • https://www.amazon.com/Moved-Cheese-Amazing-Deal-Change/dp/B000FQFSTM
  • Leading Change
    • by John P. Kotter
    • https://www.amazon.com/Leading-Change-LEADING-CHANGE-Hardcover/dp/B003YK9OB4
  • The Power Principle: Influence with Honor
    • by Blaine Lee
    • https://www.amazon.com/Power-Principle-INFLUENCE-HONOR/dp/0684810581
  • Leadership Handbook of Leadership Development
    • by Ellen Van Velsor,‎ Cynthia D. McCauley,‎ Marian N. Ruderman
    • https://www.amazon.com/Center-Creative-Leadership-Handbook-Development/dp/0470387394
  • Managers As Facilitators: A Practical Guide to Getting Work Done in a Changing Workplace
    • by Richard G. Weaver,‎ John D. Farrell
    • https://www.amazon.com/Managers-As-Facilitators-Practical-Workplace/dp/157675054X

Tuesday, October 25, 2016

Nintex Forms o365 - Redirect to another page on saving

As Nintex forms on o365 does not have the option to set the URL to the page you want to go to after saving your item, there is a work around for that, in the below code I am changing the source parameter in the url to the new page which is the edit form in my case.


var newSrc = hostWebUrl + '/Lists/MyList/DispForm.aspx?ID=' + listItemId;
var newUrl = document.URL.replace(/(source=).*?(&)/gi,'$1' + newSrc + '$2');
window.history.pushState({path:newUrl},'',newUrl);

I hope it help somebody.

Friday, October 14, 2016

Nintex Workflow o365 – Error assigning a task to SharePoint Group

I have received this error on assigning a task to a SharePoint group:

Activity in progress
Retrying last request. Next attempt scheduled after 10/14/2016 11:25 AM. Details of last request: HTTP Unauthorized to https://blablabla.sharepoint.com/sites/Test/_api/sp.utilities.utility.SendEmail Correlation Id: 1a1a1a1a- abcd-efgh-ijkl-3c3c3c3c3c3c Instance Id: 2b2b2b2b-abcd-efgh-ijkl-4d4d4d4d4d4d
Access denied. You do not have permission to perform this action or access this resource.


Then I discovered that in order to make it working I need to add my account to the group or to change its settings “Who can view the membership of the group?” to “Everyone”.

Another solution I believe is to grant full control permission to the workflow as shown here: https://community.nintex.com/community/build-your-own/nintex-for-office-365/blog/2015/05/14/o365-call-http-web-service-failed-unauthorized-access-denied

Sunday, June 05, 2016

Just passed Nintex Workflow Pro Exam!

I just checked https://learning.nintex.com site, created a free account and passed the pro exam.


And the Admin exam:



Sunday, October 18, 2015

Store the SharePoint filtered values

In case you have a view for your list and users use this view and filter its values and want to keep this filter saved without creating a personal view, you can create a JavaScript file with this content:


 








Then reference this JavaScript file from any page where you have your view. It is simply listen to the “onhashchange” and save the value after the “#” in the localStorage and retrieve it on next page load. The URL of the page after you change the filter looks like this: “/Lists/TestList/AllItems.aspx#InplviewHash6c224f7d-adc4-430c-8501-312cabe57c26=FilterField1%3DLinkTitle-FilterValue1%3DTest%2520Item” and the hash value is everything after the “#”

Saturday, October 17, 2015

Nintex Repeating Section – JSLink

This blog post is building on top other posts by me and my friend Ayman El-Hattab, where in my post (Published April 9, 2015) I talked about creating master details records with repeating section in Nintex forms and Nintex Workflow, and how you can parse the repeating section data and use the information in a workflow “foreach” loop so you can create items in a separate list.

Ayman’s post (Published: Aug 4, 2015) is about displaying the repeating section data in the list view in an easy way, which is mainly by creating a custom field type (Nintex Repeating Section Data). He created two versions 2010 & 2013. But the only problem with this way is that you will need to deploy this field type first as a farm solution, which is not an option in some scenarios like O365 and organizations who do not allow custom server side deployments. Other than that it is a great and easy to use solution.

Why and What is JSLink

So this is why I build this JSLink to make it easy to deploy especially for O365, and if you are coming from Nintex side and don’t know what is JSLink, see this definition:
“Client-side rendering is a new concept in SharePoint 2013. It’s provides you with a mechanism that allows you to use your own output render for a set of controls that are hosted in a SharePoint page (list views, display, add and Edit forms). This mechanism enables you to use well-known technologies, such as HTML and JavaScript, to define the rendering logic of custom and predefined field types.” - Muawiyah Shannak - https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a (this link has a very good group of samples). You will also need to check the samples published on the Office 365 Patterns and Practices https://github.com/OfficeDev/PnP/tree/master/Samples/Branding.JSLink where they added some reusable templates.

List Column

Starting by creating a list column of type “Multiple lines of text” in the list where we have our Nintex form. Make it a “plain text” in the “type of text to allow”.


Repeating Section

On the form, drag and drop the repeating section and add the child controls as needed, in my example here I have three text boxes: First Name, Last Name, and Age as you can see below.



I also named the controls in the same order “First Name”, “Last Name”, and “Age”. And yes with the space between “First” and “Name” because this is how I want it to look like in the view.
Then connect the repeating section control to the multiple line field created in the first step.



The Repeating Section JSLink

Now it is the step where the JSLink will do its magic, I have three files deployed to the “Site Assets” library located in the root web in the site collection. (You can choose to upload these files anywhere but remember to change the URLs in the view web part and in the override JavaScript file)

The first file is the “NintexOverrides.js”, and as you can see below I am using the PnP namespaces, and this file mainly is telling SharePoint view that we have another rendering template for one or more fields in the view:


The next file is the “RepeatingSectionTemplate.js”, and I am using the PnP namespace as well. And the purpose of this file simply is to parse the repeating section XML and display HTML table instead:


The third file is “NintexOverrides.css” cascading style sheet to set how we want the table displayed in the view:

 

Deployment

Actually there is no deployment other than copying the three files to the site assets library then set the JS Link property by doing the following steps:

  •  Browse to the view page where you want to apply this rendering (the list where the form with the repeating section is)
  • Edit the web part:




  • Scroll down to “Miscellaneous” then add “~sitecollection/SiteAssets/RepeatingSectionTemplate.js|~sitecollection/SiteAssets/NintexOverrides.js” in the “JS Link” property
  • Click “Okay” then save the page “Stop Editing”

The Output

Now you have the repeating section as follows:


And adding more repeating sections is easy as adding more “Multiple lines of text” column and connect it to the repeating section control on the form, then the output will be something like this:


Then update the “NintexOverrides.js” file to list the new column as follows:


Now the output is like this:



Click here to download the three files mentioned above.

Monday, April 13, 2015

CREATING MASTER-DETAILS RECORDS WITH REPEATING SECTION IN NINTEX FORMS

Forms that have data in a relation of one to many or with master-details can be created using Nintex Forms plus Nintex Workflow. An example of this would be an order form that includes product details such as name, unit price, quantity, taxes and total price as well as  order date, billing and shipping options, and you need to submit both parts together by clicking one submit or save button.

With Nintex Forms, you can build the master part (the order in our example) as you would any other form, using the drag and drop controls, then connect them to the right column on your list, or just keeping them unconnected if you want some of them to be just on the form and not part of the list data. The details part (the products) can be formatted on the form using the Repeating Section control, where you only design how one row should look. Here is a simple example of a repeating section with the product name and the quantity:


As I mentioned above, you can connect your controls to list columns, but for the controls inside the repeating section you cannot connect them to list columns. Instead, you can only connect the repeating section as whole to a multi-line plain text column. The data will be saved as XML in this column like this:

In 2012, Vadim Tabakman posted a very good blog article about Parsing Repeating Section Data where he is reading the repeating section data without creating an extra column for the XML. He parses the XML in a user defined action – UDA - then uses the loop workflow action to query each item inside the repeating section using an incremental index. Vadim’s post includes an example form, workflow and even the UDA. In the comments, his blog followers mentioned that using the loop workflow action is taking too much time to execute. This is true because Nintex has a farm level option named “Safe Looping” which is on by default. Safe looping simply adds delay actions to your workflow at publishing time in certain places like change state and loop. Read more about it in another post written by Vadim on November 2012. Vadim suggested to me through Nintex support that using a "Foreach" action will solve the delay issue, because Nintex does not add the delay inside the Foreach action. Imagine submitting an order with 30 products using the loop action. It would take more than 2 hours to create the order related products in the second list, while it would only take a second using the Foreach action.

Adding to the same concept, I found this post by Erik Abderhalden about Best Practices with Repeating Sections in Nintex Forms, which has some useful information you may need to know. But in his example he is creating a separate column in the main list to hold the repeating section XML while you already have it in a hidden column named DataForm on the list which has the repeating section XML encoded. 

By the way, you can access any un-connected filed on the form from the workflow by querying this hidden column if you don’t want to have a separate column for it. The same, you can have the repeating section not connected to a column and be able to use the Foreach action instead of the Loop action. Here is what that workflow looks like:


As you can see, I am using a UDA to get a collection of XML items to use in the Foreach action, and I am recommending using it as it will keep your main workflow smaller and reduce variables.  Remember, you already need to create a lot of variables to handle the details part. Here is my UDA:


Get the encoded repeating section XML using the Query XML action, then decode it and add it to a collection variable. Instead of the “Log in History List” action, add your logic to create or update the items in the products list.

You can download a sample workflow and the user defined action plus the details of each action from the links below. So I am not going to go into details for each step, as I think the downloadable screens and the other blog posts mentioned earlier have enough information. If not, please feel free to post your question in the comments below.

Conclusion:

Repeating Section in Nintex Forms is a very useful control. Dealing with parsing its data from the workflow is not hard once you know how, and one way to get the information is searching online. And if you post a question on Nintex Connect or send it to Nintex support, they will answer you in a reasonable time frame.

Friday, February 27, 2015

Error occurred in deployment step 'Install app for SharePoint': The provided App differs from another App with the same version and product ID

When you try to debug a SharePoint App from Visual Studio you may receive this error: "Error occurred in deployment step 'Install app for SharePoint': The provided App differs from another App with the same version and product ID" which means that your app is still on SharePoint somehow even if you can't see it in the Site Contents page.

To solve the issue you can check one or all of these steps:

  1. Make sure that the App is removed from the site it is installed to. Go to Site Contents and find if it is there in an error state waiting for you to click on "Try again" to be deleted.
  2. Remove the App from the site collection recycle bin if it is there (by default it will stay in the recycle bin for 93 days). This will move it to the Second-Stage recycle bin if you clicked on "Empty Recycle Bin" and will delete it if you selected the app and clicked on "Delete". (in all cases you will only find the App in the site collection recycle bin but the web site created for the App will be in the Second-Stage recycle bin, so every time you remove an App there will be one part in the first recycle bin and another part in the Second-Stage recycle bin, and restoring any of these parts will restore the other part).
  3. Remove the App from the Second-Stage recycle bin.
  4. If you still can't upload your App, repeat step 2 & 3 :)
  5. If after step #4 you can't upload your App, go to the AppManifest.xml and change the Version (or the ProductID if you are still in the development)
You can get more information about Recycle Bin here : https://support.office.com/en-us/article/Manage-the-Recycle-Bin-of-a-SharePoint-Online-site-collection-5fa924ee-16d7-487b-9a0a-021b9062d14b?ui=en-US&rs=en-US&ad=US


Thursday, July 24, 2014

Passed exam 70-486 : Developing ASP.NET MVC Web Applications

I passed exam 70-486: Developing ASP.NET MVC Web Applications two weeks ago, "al 7amd lellah", I am now preparing for Exam 70-487: Developing Windows Azure and Web Services.

ASP.NET Web API - Part 1

Two years ago (Aug 2012), my college Jonathan Kyle and I represented ASP.NET Web API at the ASP.NET Atlanta User Group, then we wrote a blog that never posted, and as I am reading again in the web services and the updates in the Web API I think I can start by posting the blog as the concept  is still the same, then write about the new features.

The first post of the series is written by Jonathan, and here it is:

Introduction:

Everything now became connected together in a way that it became so difficult to say that we have this set of communication languages or communication formats for any conversation including the question or the answer. It is also difficult to let the person you are communicating with just answer your question without adding more details unless you asked him for, and if you need more details do you want it as a text, diagram or a map or whatever? This is why there is always a need for a standard way to communicate, standard way to ask and a standard way to answer, and it is very important to have this communication method very simple to be able to communicate with anyone who has the minimum level or understanding. This is why ASP.NET WEB API is here.


What is ASP.NET Web API

A multi-tier application development platform built on top of the .NET Framework for building and consuming HTTP services that can reach a broad range of clients.  It incorporates the best from WCF Web API and the best from ASP.NET MVC.
.NET and HTTP Services Timeline

Microsoft has arrived at the ASP.NET Web API after several evolutions of web technologies, and applying the lessons learned along the way.

  • 2002: ASP.NET ASMX Services
  • 2006: .NET 3 – WCF Services (SOAP + WS-* Stateful)
  • 2007: .NET 3.5 – WCF WebHttpBinding (first attempt)
  • 2009: WCF - REST Starter Kit (separate package)
  • 2010: .NET 4/WCF - REST Starter Kit + HTTP Services
  • 2012: Merged into ASP.NET MVC Framework called “Web API”


Feature Highlights

  • Modern HTTP programming model: HTTP capable application / client such as a web browser, ajax, or HttpClient.
  • Full support for ASP.NET Routing:  Uses the HTTP method to determine which action is performed by the web application.
  • Content negotiation and custom formatters: Supports automatically converting objects from the server into the data format requested by the client such as JSON and XML.
  • Model binding and validation: Supports automatically converting and validating data from the client into objects on the server.
  • Filters and Query composition: Easily support OData and query syntax.
  • Easy to unit test: Uses MVC pattern makes an application that can have actions tested in isolation from other bits of code.
  • Improved Inversion of Control (IoC) via DependencyResolver: Uses application configuration to automatically find dependent resources for an action.
  • Code-based configuration:  Application can be configured programmatically, not just by application configuration.
  • Flexible Hosting: fully supports Self Host, IIS and Windows Azure.

Why ASP.NET Web API


ASP.NET Web API is the ideal platform for building RESTful application on the .NET Framework.  It is a pattern which enables an application to publish an entity as a Uniform Resource Identifier (URI), typically classified as a Uniform Resource Locator (URL) that is accessible using the HTTP protocol.
The application level protocol (HTTP method) such as GET, PUT, POST, and DELETE specifies the operation that is performed with the entity.  Metadata describing a message is described by the header information built into the HTTP protocol, for example:

  • The body of a message meets the criteria specified in the header such as a description of an entity in a specific format (XML, JSON, etc).
  • Entity contained in the body can be hypermedia (links to other resources)
  • A response message may be a cached response that a proxy server can use as a response without ever passing the request to a server.

ASP.NET Web API uses the elegant MVC infrastructure, allowing the utilization of the HTTP protocol with the minimum amount of coding, and enables the application developer to focus on the business specific application implementation.

Although ASP.NET Web API is an improvement over REST API in WCF by not needing the plumbing complexity, WCF may still be better for messaging and duplex communication, such as using MSMQ or TCP.

Wednesday, May 15, 2013

VPN establishment capability from a remote desktop is disabled - Hyper-V

I have a virtual machine created on Hyper-V in windows 8, I noticed that when I connect to the machine using the remote desktop connection I can't establish a VPN connection using Cisco AnyConnect  and I receive this error: "VPN establishment capability from a remote desktop is disabled". But I can establish the connection if connected to the VM using the Hyper-v Manager.

Update: Check this post by devhammer: http://devhammer.net/cisco-anyconnect-and-hyper-v---connect-to-a-vpn-from-inside-a-vm-session

Wednesday, April 17, 2013

0.1 + 0.2 != 0.3


After more than 13 years experience with JavaScript I just discovered that:

0.1 + 0.2 != 0.3

read this article to understand: http://yuiblog.com/blog/2009/03/10/when-you-cant-count-on-your-numbers/

but :

(0.1 * 10 + 0.2 * 10) / 10 = 0.3

Tuesday, November 27, 2012

Convert your VMW drives VMDK to Hyper-V drives VHD

After installing Windows 8 and using Hyper-V I searched for a tool to convert my VMW disks to be used on Hyper-V. This tool is amazing and it just take few minutes to convert a disk with Windows2008R2/SQLServer/SharePoint2010/VisualStudio2010

http://vmtoolkit.com/blogs/announcements/archive/2006/11/20/vmdk-to-vhd-converter-available.aspx

Tuesday, November 20, 2012

Special offer for Exam 70-480: Developing in HTML5 with JavaScript and CSS3

There is a special offer from Microsoft as a jump start and voucher code for free exam for 70-480: Developing in HTML5 with JavaScript and CSS3, it is one of the Windows 8 development series.

Get it from there:
http://www.microsoftvirtualacademy.com/tracks/developing-html5-apps-jump-start

I passed this exam two weeks ago, "al 7amd lellah"

Get Web Part Properties for a page with PowerShell script

It happens when you have a problem with a webpart in one of your SharePoint environments in need to debug to see what are the properties of this webpart, this PowerShell script can help:


#Add-PSSnapin Microsoft.SharePoint.PowerShell

$SiteUrl = "http://www.yoursite.com"
$pageURL = "Pages/default.aspx"

$site = New-Object Microsoft.SharePoint.SPSite($SiteUrl)
$psite = New-Object Microsoft.SharePoint.Publishing.PublishingSite($site)
$web = Get-SPWeb $SiteUrl
$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)

$wpm = $web.GetLimitedWebPartManager($pageURL, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

#List all the web parts
$wpm.WebParts | ft

#Get the details of the first web part
$wp = $wpm.WebParts[0]
$wp


SharePoint 2013 on Windows 2012 Server - Admin Intro

Just installed SharePoint 2013 Server on Windows 2012 Server and SQL 2012 Server inside Hyper-V machine on Windows 8 :)


Just wanted to share with you the screen as this will be my first blog post on SharePoint 2013, and just to show you something useful, this is the performance screen for my server till the moment:


My machine is Dell Latitude E6520 with 8 GB RAM

Wednesday, October 10, 2012

Active File in Solution Explorer - Visual Studio 2010 & Windows 8


Today I Installed Visual Studio 2010 on Windows 8 beside Visual Studio 2012, and what I noticed is that the active file - the one I am editing now - is not highlighted in the Solution Explorer, and this was really annoying as moving between files dose not showing me which file in the solution hierarchicy I am editing. And I though it is a bug in the beginning but I figured out that it is an option:

From "Tools" go to "Options" then "Projects and Solutions",  and under "General" change"Track active item in Solution Explorer" to checked.

I don't know why there is an option like this, why a user may need to edit a file and that file is not highlighted in the solution explorer

Thursday, May 24, 2012

Convert Anonymous Type into key/value Array

The answer in this link is very simple and great:

http://stackoverflow.com/questions/3481923/in-c-sharp-convert-anonymous-type-into-key-value-array


var a = new { data1 = "test1", data2 = "sam", data3 = "bob" };
var type = a.GetType();
var props = type.GetProperties();
var pairs = props.Select(x => x.Name + "=" + x.GetValue(a, null)).ToArray();
var result = string.Join("&", pairs);