Archive for the ‘JavaScript’ Category

Mini Preview Window for Contact Lookup 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 [...]

Comments (179)

CRM 4: Adding tooltips to fields on forms

Tooltips are little help messages explaning a field or label (if you hover over a label you will notice a tooltip), I had a requirenment for adding a tooltip to a custom field with some custom help text.
After some digging through i found out the correct JScript property and method:
crmForm.all.my_custom_attribute_c.title = “Add a value here and it should [...]

Comments (1)

Microsoft Visual Studio 2008 trial finished and still need to use it??

Simple answer, just change the date/clock back 20 days in control panel.
It should now say:  You have 20 days left in the trial period.

Comments (2)

CRM4: Hiding tabs and sections

Hello all,
I am currently working on a small CRM project and one of the requirements was to hide a section and a tab onLoad.
// Hiding the Contract section
crmForm.all.contractid_c.parentElement.parentElement.style.display=’none’;
// Hide the KB article tab (2nd Tab)
crmForm.all.tab1Tab.style.display=’none’;
I’m sure you can use this in other ways (i.e:. onChange, onClick etc..).
Happy Coding!

Leave a Comment

Call/Request a workflow in CRM 4.0 using Javascript

Add a button on Form’s Toolbar/Grid’s Menu Bar for the entity in ISV config file (export ISV config)
Call launchOnDemandWorkflowForm (for button on Form) or launchOnDemandWorkflow (for button on grid) functions and pass the parameters sGrid, iObjType and workflowId.
Save the config file and import it to CRM.

An example of this could be:
<Entity name=”account”>
<ToolBar ValidForCreate=”0″ ValidForUpdate=”1″>
<Button Icon=”/_imgs/mybutton.jpg” [...]

Leave a Comment

Add a Button to a Form

This post is to show how to add a Button to a MS CRM Form, not to the Navigation Pane nor to the Menu Bar, but to the actual Form itself.
In this post I will show a simple usage of the Button, to show its function. You can understand that more advanced functions can be [...]

Comments (2)

CRM 4.0: Notes Count on any Entity

NotesCount is a client side JScript customization, which enables CRM useres to recognize the amount of attached notes or attachments to any CRM record (e.g. contact, account, case, …) within the tab on top of the main form of the record.
Intention
NotesCount is intended to improve the UX of all Microsoft Dynamics CRM 4.0 users. By [...]

Comments (7)

Show no. of open or closed activities (history) on the CRM form.

Hello all,
Have you ever wanted to see the total no. of outstanding/completed activities on a Case, Account, Opportunity, Contact etc..?  

Well now you can, simply add the following JavaScript code to the onLoad event of the entity, it will query the webservice and it will give you the exact count of open/closed activities.
Update: 9th March 2010 [...]

Comments (7)

Add custom toolbar buttons to the Case Entity form.

Hi All,
Have you ever wanted to add some toolbar buttons to the CASE/CONTACT/ACCOUNT form?

Well now you can, you can use the ISV.config provided by CRM.

Export the ISV Config Customizations from CRM
Edit the XML file
Find the <entity name=”incident”> node and add the following - I couldn’t paste the XML because of wordpress limitations.

Note: the following are custom images: [...]

Comments (1)

Hiding Sidebar Navigation (Related Entities)

Hi Guys,
Recently for a client, we had to create some many-to-1 relationship from Contact to Accounts & Opportunities.  We then had the problem of the related entity navigation on the side showing up.  They didn’t want to see all these related navigations. I added some onLoad code on the contact form to hide the Sidebar [...]

Comments (1)