Showing posts with label crm. Show all posts
Showing posts with label crm. Show all posts

Thursday, May 3, 2007

Export CRM form field names

I recently had to export all the CRM form field names for a particular entity for a data mapping exercise. I needed the actual display names instead of the attribute schema names. I had to do all this through the front-end application since I didn't have access to the database. This is what I did:
  1. Open Advanced Find and create a query (against the Contact entity in this case).
  2. Use the Edit Columns feature and add all available fields by going to "Add Columns" and choose the "Select All" checkbox which selects every field.
  3. Run the query and export the data to Excel.
  4. Open the Excel spreadsheet and copy the first row which contains all the column names (the CRM fields).
  5. On a new spreadsheet go to the Edit menu and choose "Paste Special". On the pop-up menu that appears check off the "Transpose" field. This will convert the columns to rows. Voila!

Hiding and Disabling CRM fields with Javascript

I always forget the syntax for hiding and disabling fields in CRM. Below are some common examples:

//hide contract and contract line fields
crmForm.all.contractid_d.style.visibility = 'hidden';
crmForm.all.contractdetailid_d.style.visibility = 'hidden';

//disable lookup fields
var oField = crmForm.all.SOME_FIELD_ID;
oField.Disabled = !oField.Disabled;


//disable radio button field
crmForm.all.new_inboundoutbound.disabled = true;

//disable datetime field
if(crmForm.FormType!=4)
{
//disable data field
var oField = crmForm.all.new_resolutiondate;
oField.Disabled = !oField.Disabled;
}