- js for onload event
- Posted by Rick M on October 18th, 2006
If anyone can help me with the javascript for this, I would appreciate it.
I have set up an onchange event on the Account form state field. This event
sets a picklist value for a field ("MSA") when the user tabs out of the state
field. I would like to have this picklist value be set for new contacts when
they are created from the account form, using an onload event. The picklist
value would be set based upon the value of the state field. Since I do not
have much javascript experience, I tried variations of the following:
if (window.document.forms( "crmForm"
).elements("address1_stateorprovince").SelectedTex t = "DE")
{
crmForm.all.new_region.Value= "1"
}
Thanks,
-Rick
- Posted by Michael Höhne on October 18th, 2006
Rick,
If the custom field is contained in both the account and contact, you can
use a field mapping and CRM will automatically populate the field for you.
Another approach to access the parent form fields is available at:
http://www.stunnware.com/crm2/topic.aspx?id=JS6
--
Michael
Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
----------------------------------------------------------
"Rick M" <RickM@discussions.microsoft.com> schrieb im Newsbeitrag
news:3E41D4AF-0F37-4F38-A104-36F850F47AC2@microsoft.com...
- Posted by Rick M on October 18th, 2006
Sometimes you forget about the most obvious solution. Thanks for the
reminder about using field mapping.
-Rick
"Michael Höhne" wrote: