The official website of Bipul Raman

Customizing & Branding MasterPage in SharePoint Hosted App / Add-In

  Option 1: Set your own master page (for heavy customization & branding)

  • Create your custom master page, ex- bipul.master
  • Create a Module 'MasterPage' in your project to add the master page that you just created above
  • Add your custom master page to this module
  • modify the elements.xml in 'MasterPage' module as below and dont forget to replace your master page name in the code
  • <elements xmlns="">
      <module name="MasterPage">
        <file path="MasterPage\bipul.master" type="GhostableInLibrary" url="_catalogs/masterpage/bipul.master"></file>
  • Change the master page name for your App Pages as below:
  • MasterPageFile="~site/_catalogs/masterpage/bipul.master" 

Option 2: Use default master page ( for light customization & branding)

  • Add the below css in ContentPlaceHolderID="PlaceHolderAdditionalPageHead" to remove default headers and titles (SharePoint logo etc.) appearing in SharePoint Hosted app page
  • <style>
        #suiteBarDelta, #s4-ribbonrow, #s4-titlerow{display: none !important;}
        #contentRow{padding-top: 0px !important;}
  • Add your custom css and js in ContentPlaceHolderID="PlaceHolderAdditionalPageHead"
  • Add your custom HTML body elements within ContentPlaceHolderID="PlaceHolderMain"

PowerShell Automation for SharePoint Online

PowerShell based Automations for bulk operations in SharePoint Online using Microsoft PnP Packages. Bulk data is stored in XML or CSV files as per required.

Read here for complete code and instructions:

Performance enhancement tips while using CAML Query in SharePoint

Putting a lot of design customization, custom codes on SharePoint may cause several performance issues. But the main challenge for a developer is to fulfill all the feasible business requirement of client without hitting down the performance. Enhancing performance cannot be done in single step. In fact, at every step of coding you need to take care of it. You need to review every single line of code and justify if it is really needed or can be optimized in other way.

In this article, I will be discussing performance enhancement tips very specific to CAML Query. Whenever you are requesting any data from SharePoint, you use CAML query to filter it based on your parameters. You can use these parameters in CAML Query to enhance the performance.
  • Where : To put conditions or filters such as equals, contains etc.
  • OrderBy : To order the data. Instead of manipulating data later, do it in CAML itself.
  • ViewFields : To load data from selective fields
  • RowLimit : To load data in limited counts
Here is a sample CAML Query which is getting data from a list putting these parameters
  • When List Item Title is equal to 'Test'
  • Ordering data in Ascending Order
  • Loading data for only two fields: 'Title' & 'Code' 
  • Loading only 3 list items
<ViewAttributes Scope="RecursiveAll" />
is used to load data from folders situated inside the lists.

Always remember, this thumb rule while requesting any data from the server
"Request only those data which is really required"