Hi,
Hope these answers help. If you are looking for ways to accomplish these tasks without coding (based upon what you asked for item #3) it is probably not possible.
1. Your best option for creating an auto-numbering scheme like you suggest is to create this within a callout or plugin. Option 2 would be to try and generate this client side with javascript using some kind of generated number on entity create. You just need to come up with a method to ensure uniqueness.
2. You can't display the primary key field per se, but you could copy it to a field using javascript and reading it out of the crmFormSubmitId. It won't be there until after the first save since it doesn't populate this field until after the
3. You can't do this without coding, javascript can do this in the field onchange events for example.
4. Again, javascript. CRM will also not allow the save of a record if the data exceeds the field length and would be truncated.
5. You could set your iframe to use something like http://<YourCRMPath>/sfa/conts/edit.aspx#
6. Javscript and a chained/linked picklist. I've included some sample code for this at the bottom.
7. If you create the contact in Outlook, it will only get synced up with CRM if you select 'Track In CRM'.
Again, hope this helps.
Wes
Chained Picklist Sample
//Form on load event
var CRM_FORM_TYPE_CREATE = 1;
var CRM_FORM_TYPE_UPDATE = 2;
// Only enable the dynamic picklist on a Create or Update form. Disabled and
// read-only forms are not editable and so do not require dynamic picklists.
switch (crmForm.FormType)
{
case CRM_FORM_TYPE_CREATE:
case CRM_FORM_TYPE_UPDATE:
// Get a reference to the Sub-Industry picklist element for later use
var oSubIndustry = crmForm.all.new_subindustry;
// Cache the original picklist "Options" array in an "expando" on the
// element. We will use this original list to dynamicly re-build the picklist
// based on the Industry the user selects.
oSubIndustry.originalPicklistOptions = oSubIndustry.Options;
// If there is not an Industry selected, we just need to disable the
// Sub-Industry. As soon as the user selects an Industry, we will
// re-enable the Sub-Industry picklist.
if (crmForm.all.new_industry.DataValue == null)
{
oSubIndustry.Disabled = true;
}
else
{
// There is a value already selected, we need to limit the available options
// to what is valid for the currently selected Industry value. The code to
// do this already exists in the Industry Picklist's onchange event. We will
// re-use this code by manually firing the event.
new_industry_onchange0();
}
break;
}
// Get the Industry Element, since this code is re-used by the form's onload event
// we can not rely on the event.srcElement to have the approriate element.
var oIndustry = crmForm.all.new_industry;
// Initialize the Sub-Industry indexes
var iStartIndex = -1;
var iEndIndex = -1;
// Depending on what the user selects in the Industry picklist, we will select
// a range of options in the Sub-Industry picklist to display.
//
// For the purposes of this sample, it is assumed that the display text of each
// Industry will be known and will not be localized. We have also ordered the
// options in the Sub-Industry picklist so that they are group sequentially per
// Industry. This allows the code to simply define start and stop Sub-Industry
// indexes for each Industry.
switch (oIndustry.SelectedText)
{
case "Accounting":
iStartIndex = 1;
iEndIndex = 5;
break;
case "Consulting":
iStartIndex = 6;
iEndIndex = 10;
break;
}
//Picklist ONChange event
// Get a reference to the Sub-Industry picklist element for later use
var oSubIndustry = crmForm.all.new_subindustry;
// If the indexes where set, update the Sub-Industry picklist
if (iStartIndex > -1 && iEndIndex > -1)
{
// Create a new array, which will hold the new picklist options
var oTempArray = new Array();
// Initialize the index for the temp array
var iIndex = 0;
// Now loop through the original Sub-Industry options, pull out the
// requested options a copy them into the temporary array.
for (var i = iStartIndex; i <= iEndIndex; i++)
{
oTempArray[iIndex] = oSubIndustry.originalPicklistOptions[i];
iIndex++;
}
// Reset the Sub-Industry picklist with the new options
oSubIndustry.Options = oTempArray;
// Enable the Sub-Industry picklist for the user
oSubIndustry.Disabled = false;
}
else
{
// The user has selected an unsupported Industry or no Industry
oSubIndustry.DataValue = null;
oSubIndustry.Disabled = true;
}