Kashif Nizam Qureshi


Leave a comment

Adding Link in Project Detail Page (PDP) to Project Site List

To add a link in PDP that will navigate to Project Site List, add the following script in a content editor.


<p>
<a href="/PWA/SiteAssets/jquery-1.10.2.min.js">/PWA/SiteAssets/jquery-1.10.2.min.js</a>

function proj1() {

var projuid= PDP_projUid;
var url="/PWA/"+ PDP_projName +"/_layouts/15/start.aspx#/Lists/Assumptions%20and%20Constraints/AllItems.aspx";

window.open(url,'_blank');
}
<a href="javascript:proj1();">Click here to Enter and Preview Assumptions and Constraints Details </a></p>

//var $j = jQuery.noConflict();
//function getParameterByName(name) {
//name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
//var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
//results = regex.exec(location.search);
//return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
//}

<p>
</p>


Leave a comment

Ports that are required for communication between servers – SharePoint

Following shows ports that are required for communication between servers (App, WFE & DB) for SharePoint.

 

Protocol Port Usage Comment Server Source IP(s) Destination IP(s)
TCP 80 HTTP Client to SharePoint web server traffic (SharePoint – Office Web Apps commun..) SharePoint/ Project Server (Web Front End)  

 

Client Machines

 

 

WFE

App

TCP 90 HTTP Client to SharePoint web server traffic (SharePoint – Office Web Apps commun..) SharePoint/ Project Server (Web Front End)  

Client Machines

 

 

WFE

App

TCP 443 HTTPS/SSL Encrypted client to SharePoint web server traffic (Encrypted SharePoint – Office Web Apps commun..) SharePoint/ Project Server (Web Front End)  

Client machines

 

 

WFE

App

TCP 25 SMTP for e-mail integration Cannot be configured SMTP Server App (SMTP)
TCP 1433, 445 SQL Server using named pipes (445), SQL Server default commun.. port (1433). Client to Database server Database Server App DB


Leave a comment

Rename Custom Field name on PDP

Add the following script in Content Editor web part and place that web part in the end of the page (so main custom field is rendered before we can run our script).


<script type="text/javascript">
var ttnA = document.getElementsByTagName("div");

for (var j=0; j < ttnA.length; j++)

{

var orig = ttnA[j].innerHTML;

var stripped = orig.replace(/^\s*/, “”).replace(/\s*$/, “”);

if (stripped == “Owner”)

{

ttnA[j].innerHTML=”Project Manager”

}

}

</script>


Leave a comment

Adding Resource Calendar Exceptions Programmatically

ResourceDataSet rds = _resourceClient.ReadResource(new Guid(resGuid));

// be sure that the resource is checked out !

if (rds.CalendarExceptions != null)
{
for (int i = 0; i &lt; rds.CalendarExceptions.Rows.Count; i++)
{
// check row data...

// delete row if necessary
rds.CalendarExceptions.Rows[i].Delete();
break;
}
// don´t use GetChanges() method on the dataset !
_resourceClient.UpdateResources(resourceDataSet, false, false);
}

// Read resource data again
rds = _resourceClient.ReadResource(new Guid(resGuid));

// create new datarow
ResourceDataSet.CalendarExceptionsRow exceptionsRow = rds.CalendarExceptions.NewCalendarExceptionsRow();

// set necessary data for the new exception row here
//exceptionsRow.Start
//exceptionsRow.Finish
//exceptionsRow.Name
//exceptionsRow.RES_UID
//...

// update the resource again
_resourceClient.UpdateResources(resourceDataSet, false, false);

...
// don´t forget to check in the resource