Friday, December 9, 2011

HOW TOs

How to Add/Change the domain for local machine.

1. Get the IP address of AD server
2. Set that IP in to Preferefered DNS server entry for the New VM/Server you are going to add on domain
3. Go to New VM/Server's properties and Change the domain name from existing WORKGROUP/Domain.



How to run queries in Oracle Using SQL*Plus

2. Please try to install maximum components you can while installation
3. Open SQL*Plus from Programs OR run SQLPLUS command from command prompt. See image below. Image given below is self describing further steps.


Friday, December 2, 2011

Connect Oracle with SharePoint/SQL using SSIS

Using the Microsoft Connector for Oracle by Attunity with SQL Server 2008 Integration Services
http://msdn.microsoft.com/en-us/library/ee470675(v=sql.100).aspx

Microsoft Connectors for Oracle and Teradata by Attunity
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11180

Wednesday, November 16, 2011

Get Free Remote Server

http://www.cloudshare.com/

The trial period is of 15 days. However this is really good service.

Tuesday, October 11, 2011

Change Data Capture (CDC) in SQL Server 2008

http://www.mssqltips.com/sqlservertip/1474/using-change-data-capture-cdc-in-sql-server-2008/

Tuesday, October 4, 2011

SharePoint Newbies - List GUID, View GUID

To find list GUID -

- Go to “all sites content” - http://sitename/sites/webname/_layouts/viewlsts.aspx
- Click on any list (For ex. ListName) - http://sitename/sites/webname/Lists/ListName/AllItems.aspx
- Click on List Setting – As shown in Figure 1
- Page will be redirect to List Settings. Please see the URL there. You will find List GUID there – See Figure 2 and URL http://sitename/sites/webname/_layouts/listedit.aspx?List={2E9DD63B-0D31-4059-B5FE-AAA299E709F1}

To find View GUID –
- After getting List GUID in the url of setting page, just scroll down a bit on the same page. You should be able to find views section. (See Figure 3)
- Click on any of the view name you want to find GUID for. (See Figure 3)
- You will be redirect to “Edit View” page. Please check the URL on that page. It will look similar like as given below-
http://sitename/sites/webname/_layouts/ViewEdit.aspx?List=%7B2E9DD63B%2D0D31%2D4059%2DB5FE%2DAAA299E709F1%7D&View=%7B49311C81%2D0868%2D4638%2D892D%2DDE2AA53A7411%7D
- In above url, the string after text “View=” is view GUID. - %7B49311C81%2D0868%2D4638%2D892D%2DDE2AA53A7411%7D
- Here view GUID is encoded url. To decode, just replace “%7B” with “{“ ,“%7D” with “}” and replace all “%2D” with “–“).
- You will get GUID looks like- {49311C81-0868-4638-892D-DE2AA53A7411}. This is View GUID

Tuesday, August 23, 2011

Thursday, August 4, 2011

JQuery : Hide SharePoint Field with Specific Comments -

<script type="text/javascript" src="_layouts/Server/jQuery/jquery-1.4.2.js"></script>

<script type="text/javascript" src="_layouts/Server/jQuery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="_layouts/Server/jQuery/jquery.SPServices-0.5.8.min.js"></script>

<script type="text/javascript" language="javascript" >


$(document).ready(function(){

$("td.ms-formbody").each(function () {
if (this.innerText.indexOf("For Admins Only") > 0) {

$(this).parent().hide();
}
else
{

}
});

});

</script>

Friday, July 8, 2011

Code to Create SharePoint views Programatically using SP WebService

public void CreateView(string strCategory)
{
WRCreateView.Views objCreateViews = new CreateViews.WRCreateView.Views();
objCreateViews.Url = "http://Sitename.net/sites/SiteCol/_vti_bin/views.asmx";

NetworkCredential netcred = new NetworkCredential("MyUserName", "MyPassword", "MyDomain");

objCreateViews.Credentials = netcred;

string strQuery = " " + strCategory + "";

string strRowLimit = "100";

string strViewFields = "";



System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();

System.Xml.XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
System.Xml.XmlNode ndRowLimit = xmlDoc.CreateNode(XmlNodeType.Element, "RowLimit", "");
System.Xml.XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");

ndQuery.InnerXml = strQuery;
ndRowLimit.InnerXml = strRowLimit;
ndViewFields.InnerXml = strViewFields;

XmlNode retNode = objCreateViews.AddView("{794D4A54-960D-2322-1234-B6A672927FB7}", strCategory, ndViewFields, ndQuery, ndRowLimit, "HTML", false);

//XmlNode xmln = objCreateViews.GetView("{794D4A54-960D-47FA-1234-B6A672927FB7}", "{44F80DED-1235-485B-9B47-3EB2FDD797B1}");
}

Wednesday, July 6, 2011

Programmatically start workflow

Steven Van de Craen's Blog - Programmatically start workflow: "Guid wfBaseId = new Guid('{6BE0ED92-BB12-4F8F-9687-E12DC927E4AD}');
SPSite site = ...;
SPWeb web = site.OpenWeb();
SPList list = web.Lists['listname'];
SPListItem item = list.Items[0];
SPWorkflowAssociation associationTemplate= list.WorkflowAssociations.GetAssociationByBaseID(wfBaseId);
site.WorkflowManager.StartWorkflow(item, associationTemplate, '');"

Wednesday, June 8, 2011

Adjust column size



.ms-vh2 div table tr td
{
white-space: normal
}


Tuesday, June 7, 2011

Monday, June 6, 2011

SharePoint - Hide User field in Edit form using JQuery

$("nobr:contains('User')").parent().parent().parent().hide();

Friday, May 27, 2011

Bugs Issues & Fixes Solutions

Nintex Workflow - Installtion issue

Not able to find Nintex Workflow Management section in Central admin.

After successful installation some SP versions dont enable features automatically. It should be done manually by using following command

1. "stsadm.exe -o installfeature -name nintexworkflowadmin -force"

Operation completed successfully.


2. stsadm.exe -o activatefeature -name nintexworkflowadmin -url http://CentralAdminWebsite:29638 -force

Operation completed successfully.

Word Automation Service(SP2010) is not working -3:00 PM 1/9/2013

The WAS job always remains in InProgress state.

1. Go to central Admin --> Stop Word Automation Service
Then Start Word Automation Service

2. Restart SharePoint Administration Service from Services(Go to run --> Services.msc)

3. Restart SharePoint Timer Service from Services(Go to run --> Services.msc)

Wednesday, May 25, 2011

Thumbnails in SharePoint

http://www.codeproject.com/KB/sharepoint/linkimagewp.aspx

Thursday, May 12, 2011

Monday, May 9, 2011

MOSS2007: Long Running Job and Time Out

http://suehernandez.wordpress.com/2010/03/03/sharepoint-2007-long-running-operations-timeout/

Tuesday, May 3, 2011

Useful Sharepoint Goodies

http://geekswithblogs.net/naijacoder/archive/2010/03/04/138347.aspx

Tuesday, April 19, 2011

Sample SharePoint timer Job code

Feature Code - TimerJob.cs

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace CancellationTimer
{
class CancellationTimerJob : SPFeatureReceiver
{
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSite site = properties.Feature.Parent as SPSite;
String TaskName = "Task Creator";

// make sure the job isn't already registered
foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)
{
if (job.Name == TaskName)
job.Delete();
}

// install the job
TaskTimerJobImplementation oCreateTaskTimerJob = new TaskTimerJobImplementation(TaskName, site.WebApplication);



SPMinuteSchedule schedule = new SPMinuteSchedule();
schedule.BeginSecond = 0;
schedule.EndSecond = 59;
schedule.Interval = 1;

oCreateTaskTimerJob.Schedule = schedule;

oCreateTaskTimerJob.Update();
}

public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
SPSite site = properties.Feature.Parent as SPSite;
String TaskName = "Task Creator";

// make sure the job isn't already registered
foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)
{
if (job.Name == TaskName)
job.Delete();
}
}

public override void FeatureInstalled(SPFeatureReceiverProperties properties)
{
throw new Exception("The method or operation is not implemented.");
}

public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
{
throw new Exception("The method or operation is not implemented.");
}
}
}


TimerClass.cs----------------------------------------------



using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
namespace CancellationTimer
{
public class TaskTimerJobImplementation :SPJobDefinition
{
public TaskTimerJobImplementation()
: base()
{

}

public TaskTimerJobImplementation(string jobName, SPService service, SPServer server, SPJobLockType targetType)
: base(jobName, service, server, targetType)
{

}

public TaskTimerJobImplementation(string jobName, SPWebApplication webApplication)
: base(jobName, webApplication, null, SPJobLockType.ContentDatabase)
{
this.Title = "Task Creator";
}

public override void Execute(Guid targetInstanceId)
{
base.Execute(targetInstanceId);

// get a reference to the current site collection's content database
SPWebApplication oWebApp = this.Parent as SPWebApplication;
SPContentDatabase oConDB = oWebApp.ContentDatabases[targetInstanceId];

// get a reference to the "Tasks" list in the RootWeb of the first site collection in the content database
SPList taskList = oConDB.Sites[0].RootWeb.Lists["TestingToDelete"];

// create a new task
SPListItem newTask = taskList.Items.Add();
newTask["Title"] = "Auto Task : " + DateTime.Now.ToString("dd-MMM-yyyy HH:mm:ss");
newTask.Update();
}
}
}


Thanks to

http://rajasinghtechshare.blogspot.com/2010/04/how-to-create-custom-timer-jobs-in.html
http://www.mssharepointtips.com/tip.asp?id=1021
http://community.zevenseas.com/Blogs/Robin/Lists/Posts/Post.aspx?ID=87