Thursday, September 25, 2014

Solution deployment stuck on deploying

I got the deployment issue in visual studio and powershell scripts in farm solutions. Most of the solutions in the google are suggesting to do the following steps and I did and restarted the all the servers. But the issue continues. Fortunately I got the real reason after reviewing the sharepoint log file. So the lesson learned is "The reason may be anything and review your log file carefully"

The actions which I tried (not got the solution)

1.   Make sure SharePoint timer service should be started on all the servers (web front ends as well as app server)
2.   Try restarting the SharePoint Administration service on all the servers.
3.   Restart all the SharePoint servers
4.   Make sure that all the servers in farm are on the same time zone.
5.   Execute stsadm -o execadmsvcjobs on all the servers of the farm
6.   Cancel the deployment job by means of central administration, remove the solution and try to add the solution again & check the results.
7.   Check the status of the jobs by means of CA-timer job status or use te following command - stsadm -o enumdeployments   - This will give you the list of all the pending & active deployments.

Still had the error while cancel the deployment job using CA. The error thrown by CS is "Object reference not set to an instance of an object". This confuses me more and I started reviewing the sharepoint log file using ULS Viewer, and I got the real reason for this strange behaviour.

SharePoint Log Critical Error

Database full error on SQL Server instance 'XXX' in database 'SharePoint_Config'. Additional error information from SQL Server is included below.  Could not allocate space for object 'dbo.Tombstones'.'PK_Tombstones' in database 'SharePoint_Config' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.



Solution


Increased the DB size and the issue is resolved

USE master;
GO
ALTER DATABASE SharePoint_Config
MODIFY FILE
    (NAME = test1dat3,
    SIZE = 10240MB);
GO


or Use "SQL Management Studio" as shown below.





Sunday, September 21, 2014

Useful Links

http://aaclage.blogspot.ca/2013/09/example-custom-ui-metro-style-tiles.html
http://karinebosch.wordpress.com/sharepoint-controls/peopleeditor-control/
http://www.sharepointanalysthq.com/2014/05/custom-webpart-editor/
http://fahadzia.com/blog/2009/08/peopleeditorpeoplepicker-control-as-web-part-property/

Thursday, September 18, 2014

SharePoint 2013 Modal Dialog with parent page refresh


<script type="text/javascript">

function ShowModal() {

    ExecuteOrDelayUntilScriptLoaded(function () {

        var options = {

            url: 'http://sharepointsite.com/sites/devsite/Lists/Project%20Tasks/DispForm.aspx?ID=2&Source=http%3A%2F%2Frmitscvpspqa02%3A1000%2Fsites%2Fdevsite%2FLists%2FProject%2520Tasks%2FAllItems%2Easpx&ContentTypeId=0x010800EFF7689E39CAEB4C9BF59AEB73ABEFA9',

            tite: 'Add Vendor',

            width: 800,

            height: 475,

            allowMaximize: true,

            showClose: true,

            dialogReturnValueCallback: scallback

        };

        SP.UI.ModalDialog.showModalDialog(options);

    }, 'sp.js');

 }



 function scallback(dialogResult, returnValue) {

      alert(dialogResult);

      SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);



      if (dialogResult == SP.UI.DialogResult.OK) {

           alert('Ok');

           SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);

           }

      }

          

      </script>

<input onclick="javascript:ShowModal();" type="button" value="Model Popup"/>

Friday, September 5, 2014

Office 365 Development Setup & SharePoint PnP


Step 1 : SharePoint Online: Sign up for a free Office 365 Developer Site from your MSDN subscription


Step 2 : Login to : https://portal.office.com and use your credentials


Step 3 : The home page will be shown like the below image


4      


Step 4 : Click the SharePoint and the SharePoint Administrator page will appear as shown below. Note that the admin website link is required for some visual studio app development.

Step 5 : Create a Developer Site collection and it is highlighted as shown below

      Step 6 : Now go to https://github.com/OfficeDev/PnP and download the sample ZIP file. It contains core components and samples and need VS 2013 (I tried using VS2013)



      Step 7 : Open a sample project from the downloaded zip file


Step 8 : Now build and run the project or press F5.






Step 9 : That is it. :) ... Make sure you understand the code in the samples which will make your work easy and reduce your code dramatically. The good thing is its all CSOM and hosted in S2S (Provider hosted app model).

Reference : 


Wednesday, September 3, 2014

SharePoint 2013 Designer Workflow - Expense claims approval process part 2 of 3


List of Article in Series

2. Build Workflow using SharePoint Designer (part 2/3)
3. Deployment and Testing (part 3/3) 

Build Workflow using SharePoint Designer
In my previous article I have explained the expense claims workflow logic and provided a Visio diagram. Make sure to read the first article before proceeding further.

Used SharePoint Designer to develop the workflow and no code. I used some basic activities which are available in SharePoint 2013 and built a complex ( J ) approval process.

The below are the Text-based and visual workflow designer code.

Text-based


Visual Designer


Hope you enjoyed building this workflow and we will meet in the next article on deployment and testing the workflow.

SharePoint 2013 .Wsp vs .App Scenario

Always try to use Apps whenever it is possible. Because 

1. Sandbox solution is supported but it is deprecated.
2. Farm solution requires downtime, cost and monitoring
3. Choose the solution and Apps model based on the scenario and the below screen shot will explain the scenario and the recommended model