Archive

Author Archive

Exchange 2003 Tips

July 13th, 2010

Prequisite for installation of Exchange Server:

IIS, SMTP, WWW service ,NNTP, W3SVC
NET Framework
ASP.NET
Then run Forestprep.exe
The run domainprep.exe

Standard port numbers for SMTP, POP3, IMAP4, RPC, LDAP and Global Catalog:

25 SMTP
110 POP3
143 IMAP4
135 RPC
389 LDAP
636 LDAP (SSL)
3268 Global Catalog
465 SMTP/SSL
993 IMAP4/SSL
563 IMAP4/SSL
53 DNS
80 HTTP
88 Kerberos
102 X.400
110 POP3
119 NNTP
137 - NetBIOS Session Service
139 - NetBIOS Name Service
379 LDAP (SRS)
443 HTTP (SSL)
445 - NetBIOS over TCP
563 NNTP (SSL)
691 LSA
993 IMAP4 (SSL)
994 IRC (SSL)
995 POP3 (SSL)
1503 T.120
1720 H.323
1731 Audio conferencing
1863 - MSN IM
3268 GC
3269 GC (SSL)
6001 Rpc/HTTP Exchange Store
6002 HTTP Exchange Directory Referral service
6004 Rpc/HTTP NSPI Exchange Directory Proxy service/Global Catalog

MSCRM-Admin Exchange 2003

jQuery 1.4.2 Visual Cheet Sheet

July 13th, 2010

jQuery cheet sheet for those web developers: jquery-visual-cheat-sheet-1-4-2.pdf

MSCRM-Admin Web Dev

Setup failed to determine whether a supported version of Microsoft Outlook is installed - Outlook 2010

July 13th, 2010

I recently tried to install the CRM client with my install of office 2010 (on Windows 7) and got an error and couldn’t continue.

“Setup failed to determine whether a supported version of Microsoft Outlook is installed”

The Fix:

Right click the install window on the taskbar and click “Close Window” - It will give you a choice “Do you really want to cancel the setup” then click “Yes”

It should begin installing:

It should complete, now open outlook and configure CRM for outlook (CRM URL, Organisation etc..)

Install Client Update Rollup 7 and 11 or else the CRM toolbar will be in a new “Tab” in Outlook 2010 called “Addins”:

It should turn out like this:

MSCRM-Admin CRM 4.0, CRM 4.0 Client

CRM 4: IFD Authentication using C#

April 14th, 2010

A very common question is: “How do i run a plugin/custom web application against a IFD deployment?”

You should use the below code:

CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://YOUR.IFD.URL/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
orgRequest.UserId = @"username";
orgRequest.Password = "password";
RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);
OrganizationDetail orgInfo = null;
foreach (OrganizationDetail orgdetail in orgResponse.OrganizationDetails)
{
   if (orgdetail.OrganizationName.Equals("OrgName"))
   {
   orgInfo = orgdetail;
   break;
   }
}
if (orgInfo == null)
{
   throw new Exception("The specified organization was not found.");
}
RetrieveCrmTicketRequest ticketRequest = new RetrieveCrmTicketRequest();
ticketRequest.OrganizationName = orgInfo.OrganizationName;
ticketRequest.UserId = @"username";
ticketRequest.Password = "password";
RetrieveCrmTicketResponse ticketResponse = (RetrieveCrmTicketResponse)disco.Execute(ticketRequest);

CrmAuthenticationToken sdktoken = new CrmAuthenticationToken();
sdktoken.AuthenticationType = 2;
sdktoken.OrganizationName = orgInfo.OrganizationName;
sdktoken.CrmTicket = ticketResponse.CrmTicket;
CrmService service = new CrmService();
service.CrmAuthenticationTokenValue = sdktoken;
service.Url = orgInfo.CrmServiceUrl;

Code: ifd-service-auth-code.txt

MSCRM-Admin CRM 4.0, Plug-ins , , ,

Backup and restore your SharePoint website using SharePoint Designer

April 14th, 2010

Found this PDF on how to backup and restore your SharePoint (SPWeb) website using SharePoint Designer: backup-restore-share-point-2007.pdf

Kudos to the Creator of the PDF.

MSCRM-Admin Sharepoint , , ,

SP - Uploading files to SharePoint document library

March 9th, 2010

here we go, just some simple upload code that uploads documents into a document library.

It also checks if the same file exist in the destination library before upload.

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // i always add this in to prevent security errors
Stream fStream = postedFile.InputStream;
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
string newFilename = System.IO.Path.GetFileName(postedFile.FileName);
SPFile fileExist = web.GetFile(destFolder + "/" + newFilename);

if (fileExist.Exists)
{
    Response.Write("<font color='red'>Error: A file exist with the same filename. Please Rename this File.</font><br />");
}
else
{
   web.GetFolder(destFolder).Files.Add(newFilename, contents);
   completed.Text = "<br /><font color='green'>Successfully uploaded '" + filename + "' to: " + destFolder + " </font><br /><br /><br />";
}

MSCRM-Admin Sharepoint , , , ,

CRM 4 - Update Rollup 9

March 9th, 2010

Well, update roll up 9 is out (how the hell did we get to 9??)! Jeez with all these update packs there needs to be a full job to implement all these updates on servers and implement the necessary changes the update pack doesn’t.

KB article: http://support.microsoft.com/default.aspx?kbid=977650

Download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=5869f2b3-d1a0-4f71-8be3-fde6e8053a2e

MSCRM-Admin CRM 4.0 , , , , ,

Mini Preview Window for Contact Lookup Field

March 9th, 2010

Preview Field

Looks cool doesn’t it. well here goes nothing..

to achieve the above you will need the following (click read more link..)


// the following code is for the hover over lookup window

function OnCrmPageLoad()
{
/*
Reference the to Lookup, Provide the lookup (control) id.
*/
var PrvToLui = new LookupPreview("new_primarycontactid");
/*
Add Account Preview Information ,
returns an account entity wrapper object
*/
var accountEntity = PrvToLui.AddEntity("account");

/*
Add Account Preview Attributes,
Provide lable and schema name for each attribute
*/
accountEntity.AddAttribute("Business Phone","address1_line1");
accountEntity.AddAttribute("Mobile Phone","address1_city");
accountEntity.AddAttribute("Fax","address1_stateorprovince");
accountEntity.AddAttribute("E-mail","address1_postalcode");
/*
Add Related Entity (Primary Contact) Information
AddLinked requires the entity name and
lookup field schema name on the account.
*/
var contactEntity = accountEntity.AddLinked("contact","primarycontactid");
contactEntity.AddAttribute("Primary Contact","fullname");
contactEntity.AddAttribute("Contact Phone","telephone1");

/* ------------------------------------------------------------------ */

//Contact Entity Preview
var contactEntity = PrvToLui.AddEntity("contact");
contactEntity.AddAttribute("Business Phone","telephone1");
contactEntity.AddAttribute("Mobile Phone","mobilephone");
contactEntity.AddAttribute("Fax","fax");
contactEntity.AddAttribute("E-mail","emailaddress1");

var accountEntity = contactEntity.AddLinked("account","parentcustomerid");
accountEntity.AddAttribute("Parent Company", "name");
accountEntity.AddAttribute("Parent Street","address1_line1");
accountEntity.AddAttribute("Parent Suburb","address1_line2");
accountEntity.AddAttribute("Parent State","address1_stateorprovince");
accountEntity.AddAttribute("Parent Postcode","address1_postalcode");
accountEntity.AddAttribute("Parent Website","websiteurl");
/* ------------------------------------------------------------------ */

}
Read more...

MSCRM-Admin CRM 4.0, JavaScript , , , , ,

Update Filename or List Item name programmatically in SharePoint/WSS

March 9th, 2010

As simple as it sounds, it ain’t simple.

you would of thought the following would work:

SPFile file = web.GetFile(strUrl);
file.name = "mynameFilename.txt";
file.Update();

does not compute..

There are 2 ways I’ve found of accomplishing this:

1. using the SPFile.MoveTo method:

string strUrl = "http://mysharepointsite/myolddocumentlibrary/Filename.txt";
string newFileUrl = "http://mysharepointsite/mynewdocumentlibrary/mynewFilename.txt";

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it from erroring out due to security errors
SPFile file = web.GetFile(strUrl);
file.MoveTo(newFileUrl);

2. using File.Item["Name"] method..

string strUrl = "http://mysharepointsite/myolddocumentlibrary/Filename.txt";

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it from erroring out due to security errors
SPFile file = web.GetFile(strUrl);
file.Item["Name"] = "NewFileName.txt";

However i have found method 1 more reliable. hope this helps!

MSCRM-Admin Sharepoint , , , , ,

Sharepoint 2010 Preview Sneakpeak

August 12th, 2009