Browsing All Posts filed under »JScript«

CRM 2011 – Be careful removing fields from a form

September 5, 2012

4

I had written some javascript which retrieved values from a field which I was displaying on the form. I had added an account field onto a quote product, so I could then use the account id to inject into some fetchXML in a subgrid so I only showed quote products which had only been sold […]

CRM 2011 – Javascript to set the current date and time

May 17, 2012

2

A quick blog entry and a suprisingly easy and small piece of code In the code below I have function which gets triggered when a user ticks the confirm Closed checkbox it then sets the current date and time. if the user untick the checkbox I wipe the date and time value. The date functionality […]

CRM 2011 – Very quick tip – how to get the guid of the entity

April 12, 2012

0

I was trying to get the guid of the contact form and initially I was trying to get the contactid attribute but it wasn’t working. The solution is simple var GUIDvalue = Xrm.Page.data.entity.getId(); You can then use the guid in oData calls.

CRM 2011 – Displaying images for a contact

April 3, 2012

1

A quick blog post to point you in the direction of a couple of exellent tools to display images in for a contact (or other entities). The timing of this was a day too late (for me) because I had written a basic way to display images yesterday and then today I find the solution […]

CRM 2011 – displaying similar quote products in a subgrid by injecting FetchXML

April 2, 2012

15

I had a requirement this week where a customer was adding products to a quote and when they selected a product they then want to see previous quotes which featured the same product and the price and quantity it sold for.  Basically the sales person wanted to see what the product had been sold for […]

CRM 2011 – Setting a user lookup with the logged in user with Javascript

March 21, 2012

9

Sometimes you need to log the current user in a User Lookup. Xrm.Page.context.getUserId() if you wanted to set a user lookup field you would need to do this meta_aurarrangedby is a user lookup field This will set the correct guid but the user name will be blank until the page is reloaded if you want […]

CRM 2011 – defaulting the Customer lookup to contacts on the case form

March 20, 2012

1

There are a few lookups in CRM call Customer lookups and can be either Accounts or Contacts. I have to say I often find these annoying.  Often on the Case form I have to add an account lookup so the user can specify an account and a contact.  The problem is when I use the […]

CRM 2011 – adding validation to the Resolve Case button

March 14, 2012

2

I had a scenario where the customer wanted the helpdesk user to fill in some call analysis fields when a case was resolved. Initially I made a new status called Completed, I created some new fields for the users to fill in regarding customer satisfaction, if they resolved the case within the time period and […]

CRM 2011 – Tool – JavaScript Model Generator

March 8, 2012

3

I like to see what useful tools are being created  and there have been some fantastic ones, my favourite is the sitemapeditor I have been writing some Javascript recently and it’s always a bit of a hassle having to look up all of the  names of the fields you want to use. In CRM 4 […]

CRM 2011 – Javascript case statement

March 7, 2012

0

I had to write some code where I had a lot of checkboxes and when a user selected a value on a dropdown then some would be shown and the rest would be hidden. To do this I created 6 sections and placed the checkboxes in the correct section.  When the user changed the dropdown […]