Feeds:
Posts
Comments

Archive for July, 2011


Recently while working on an implementation, there came some requirements so here we go

  • We had to implement parallel workflow approval process within project server workflow,
    and as project server uses a sequential hence it was a problem
  • Had to capture adhoc data for project server for reporting purpose and for everything you can’t use custom fields

Now there are multiple solutions to it use an infopath / sharepoint list etc… which all have their own pros & cons

however i took an  alternative approach of using  javascript to laod a modal dialog box for user interaction to get the required data filled in and come back to the same PDP page, one thing i found most usefule with this was you can customize as mucha s you want, also you can really control the navigation, let user be on the same page unless information is filled in and at last you can execute server side code without having to post back , so what i did

1. Create a Site Page
2. Customize the Ribbon and add your own buttons to it , However i disabled the default Page Tab and created a new tab with my own custom buttons
3.  Create custom web part where user will fill in data
4. Put your custom logic on web part
5. Call Site page in Modal dialog box

So Step 1 through 4 are pretty easy and is specific to environment so as you wish you can do it however i have tagged couple of  links for ease
So the Final Step 5, how to call that modal dialog box,
1. Edit the PDP page where you want to place the Link / Button / any other control, i am using hyperlink for easy reference
2. Insert a Content Editor Web Part

3. Edit the HTML Source of Content Editor Web Part

4. Paste the Code given below in CEW 

<script type="text/// <![CDATA[
javascript
” language=”// <![CDATA[
javascript" type="text/javascript" style="text-decoration: underline">
// ]]>

function CallModalDialogPopup {

      var name = "projuid";

name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 

 var regexS = "[\\?&]"+name+"=([^&#]*)"; 

var regex = new RegExp(regexS); 

 var url = window.location.href; 

 var lowercaseurl = url.toLowerCase(); 

var results = regex.exec(lowercaseurl); 

 if( results == null ) return "";

 else {

 targeturl = "/PWA/ProjectWorkflowPages/ConfigDocs/Survey.aspx?Projuid=";

        targeturl += decodeURIComponent(results[1].replace(/\+/g, " "));

var options = SP.UI.$create_DialogOptions();
options.url = targeturl;
//alert(options.url);
options.title = "ModalDialogPopUp";
options.width = 1000;
options.height = 850;
SP.UI.ModalDialog.showModalDialog(options);
       }


</script>

 Click here to submit <a onclick="javascript:CallModalDialogPopup” href=”#” style=”text-decoration: underline”>Calling Modal Dialog

Note : Make Sure Your Path to site page is configured properly in java script

5. Viola Youa re done your modal dialog box is up

// ]]>

Advertisements

Read Full Post »


After a long break am getting active again 😉 So here goes the problem statement, we met with a scenario wherein we had to get some data validated before it could be fed into a custom field within PDP page, though there are multiple solution to it, you can do it within workflow itself wherein before submit you can validate the data and throw error, but challenge was to get it done without having to modify the workflow, though even if you are doing it in workflow there are couple of challenges or even you use PSI to update in backend you will encounter issues like CICO (Check In Checkout as you never know when the project gets checked in what if someone in the background is already editing  / also you need a publish before the values start refreshing / If Custom field is workflow controlled )

To this problem i started looking for a solution without much custom coding requirement, so here it goes

1. Developed a simple validation web part, which does nothing but simply checks if data is not duplicating and is unique before accepting it in custom field in PDP
2. Embedded the Web part in a Site page it works perfectly fine and validates the data

Next problem how do i manage the navigation consistent, navigating users  to a different page and then bringing them back was one problem and next was to fill in the validated value in custom field

3. I know its ugly but just to enable the functionality temporarily(will enhance it later on) using it,  inserted a content editor web part on PDP page  modified the HTML Source and embedded the java script code to get the value and fill the value, And Here is the snapshot along with Sample Code

Caller Page:
<script type=”text/javascript”>

function findacontrol(target) {
var arr = document.getElementsByTagName(‘input’);

var CustomFieldTestGuid = document.getElementById(”).value;

for (var i = 0; i < arr.length; i++) {
if (arr[i].type == ‘text’ && arr[i].GUID == CustomFieldTestGuid)
{  arr[i].value = target;  }

}

}

//Dialog opening

function OpenDialog() {

var options = SP.UI.$create_DialogOptions();
options.url = “/_layouts/CustomAppPage/CustomFieldTestDialog.aspx?Url=http://ServerName/PWA”;

options.title = “Enter Division Code”;
options.width = 250;
options.height = 150;
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);

}

var messageId;

// Dialog callback
function CloseCallback(result, target) {

if (target != null && target!=””) {

document.getElementById(”).innerHTML = target;

findacontrol(target);

}
}

</script>

Return to caller Page:

function BtnSubmit_Click() {

var form = document.forms.<%SPHttpUtility.NoEncode(Form.ClientID,Response.Output);%>;

//alert(form.<%SPHttpUtility.NoEncode(TxtCustomFieldTest.ClientID,Response.Output);%>.value);

var CustomFieldTest = form..value;

SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, CustomFieldTest);
}

function BtnCancel()

{

//debugger;

SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.Cancel, “”);

}

Read Full Post »


So here comes the SP1, did tried hard to resist myself not to install fearing loosing all my customization i had done over a period of time but technology, its simply irresistible, so after going through feedback of experienced colleagues who already tried it, i started over everything seemed to work pretty easy with of course a couple of small burns so hereby go my experience

1. Run the setup from Project Server 2010 SP1  (it includes SharePoint 2010 SP1)

2. DO NOT run the SharePoint Configuration Wizard yet

3. Install Office Servers 2010 Language Pack SP1  (it does includes Project Server 2010 SP1 Language Pack)

4. DO NOT run the SharePoint Configuration Wizard yet

5. Install Project Server 2010 June 2011 CU  (it includes SharePoint 2010 June 2011 CU, MS recommended to install it along with SP1 as SP1 doesn’t contain fixes included in SP1)

6. Reboot Server

7. Run the SharePoint Configuration Wizard

Note: This has been performed on one server, if you are installing in farm refer to this Technet article

So Install goes successful, followed by a sharepoint configuration wizard getting through without any glitch
next i open sharepoint central administration(CA) page and get error WWW Services stopped , so opened Service console and started WWW service and ran CA  again BUMMER  ERROR : Service Unavailable HTTP Error 503

Resolution :

1. Restarted machine 😉 Didn’t worked

2. Opened IIS Manager, checked the web sites, all were stopped, so started  all of them, Still the same error

3. Checked App Pools , and there it was, App pools were stopped, restarted them and viola everything worked like a charm 😀

So Guess what did i checked next ? and you guessed it correct cross browser access and here you go, though it still doesn’t support all pages but My task it works find below the snapshot 🙂

Pic Above : Before SP Install, PWA in Mozilla

 

Pic Above : My Task in Mozilla

Pic Above : My Task in Chrome

Pic Above : My Task In Safari

Still more testing required, will update further in next post 🙂

Read Full Post »


 Thanks to the constant support of all Friends and my Forum Users that I too got an MVP Status. Well, roads were paved by Sunil Sir, he always kept me motivated to work towards this.

I always had this feeling so far – that I may be less settled in life, compromising on job and technology forefront due to some personal obligations but after I got engaged to the MS Project Forum this feeling wiped off. Every question came as a challenge and urged me to dig it down, so in course of action I learned lots many concept and being on the Forum with so many Domain Experts kept me accountable for everything I post. So no scope left for any mistake. I learned a lot. It’s like a Dream come true out of Blue Moon.

Once again thanks to all, without your trust and support this wouldn’t have happened.

Read Full Post »


Some very Useful Links :

1.  Provides update on an Application’s Life Cycle, its End of Support Date of MS, Last Patch released. Search it, to know the Dates till which MS would support a version.

http://support.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=project&Filter=FilterNO

2. The link tracks all updates/patches to all supported versions of MS like:

  • Microsoft Office suites
  • Microsoft Office desktop programs (including Access, Excel, InfoPath, OneNote, Outlook, PowerPoint, Project, Publisher, SharePoint Designer, SharePoint Workspace, Visio, and Word)
  • Microsoft Office servers (including SharePoint Server, Forms Server, Groove Server, PerformancePoint Server, Project Portfolio Server, and Project Server)
  • Office Web Apps
  • Search Server
  • SharePoint Foundation and Windows SharePoint Services
  • FAST Search Server for SharePoint

http://technet.microsoft.com/en-us/sharepoint/ee748587.aspx

3.  Find Error Messages and Work out when you Click and Run their Set-ups.

http://office.microsoft.com/en-us/excel-help/click-to-run-setup-error-messages-HA101850567.aspx

4. Office 2010 SP1 release, it has some updates added for MS Project 2010 too, read it at

 Download the Microsoft Office 2010 Service Pack 1 Changes.xlsx package now. (http://download.microsoft.com/download/5/1/2/512CC712-4070-4CFF-BC4A-B3AFF0E21A1E/Microsoft Office 2010 Service Pack 1 Changes.xlsx)

Read Full Post »


Most awaited SP for Project Server is out 🙂

Note : Have heard people facing problem in downloading x86 vs x64 bit versions, if you are not getting x64 or x86 on the download page try downloading it from appropriate OS desktop version, IE has became pretty intelligent it detects your OS version and makes appropriate link available for download, so if you want x86 log on from a 32 bit OS or vice versa you will get what you want 🙂

The following TechNet article provides information on how to deploy Microsoft Project and Project Server 2010 SP1: Deploy Service Pack 1 for Project Server 2010.

It is strongly recommend that you deploy the June 2011 Cumulative Update for Microsoft Project and Project Server 2010 when you install SP1. You can download the June 2011 Cumulative Update from the KB Articles from the links below:

The following TechNet article provides information on how to deploy Project Server Cumulative Updates: Updates for Project Server 2010

For More Information :: Click Here

Read Full Post »