Posts

Showing posts with the label Basics

Most Used JavaScript Syntax used in MS CRM

In this blog we will see how we can retrieve different data types fields values in MS CRM using JavaScript. Different types of data types in MS CRM: Single Line of Text Option Set (Dropdown) Two Options (Radio Button) Image Whole Number Floating Point Number Decimal Number Currency Multiple Lines of Text Date and Time Lookup  Single or Multiline Field :  var name = formContext.getAttribute("new_name").getValue(); formContext.getAttribute("new_name").setValue(); Option-Set Field :  int value = formContext.getAttribute("new_type").getValue(); var optionsetText = formContext.getAttribute("new_type").getText(); formContext.getAttribute("new_type").setValue(100); //100 will be the optionset value Multi-Select Option-Set Field :  var multiselectValueArr = formContext.getAttribute("new_multiselect").getValue(); formContext.getAttribute("new_multiselect").setValue([100, 200, 300]); Two-Option Field :  var value = formConte

Add Data Import Status to sitemap of Model Driven App

Image
The Data Import feature of MS CRM helps you to import data in bulk by using an Excel template. Now, when you import Excel data to CRM, CRM provides you with the great feature of observing the data import status immediately in the same window. But what if users want to see their status after some time? Then they need to navigate to advanced settings -> Data Management -> Import This requires a lot of clicking to just see the status of the data import.   To avoid this issue, we will add data import to the sitemap of the model-driven app. You just need to add URL subarea to your sitemap.   Follow below steps to add URL subarea to sitemap 1. Open your model driven app from solution 2. Customize the sitemap 3. Add subarea to your sitemap 4. Select Type as a URL 5. Mentioned below URL to see Data Import Status 6. Give some meaning title like Data Import Status   Format of URL should be like below : /main.aspx?appid=[YourAppID]&pagetype=entitylist&etn=importfile Replace [Your