- JavaScript: Change Contact for Case
- Posted by Ernst Kuschke (C# MVP) on July 24th, 2006
Hi guys,
I am pretty new to CRM, so please have a bit of patience :-)
I have a custom "contact select" .aspx page which I render in an IFrame
when my user opens a new Case.
I need to set the Case's Contact to what the user selects in my custom
selection via JavaScript.
At this stage I am trying the following:
var crmForm = window.parent.document.getElementById('crmForm');
crmForm.all.customerid.DataValue = rowSelectedId;
where rowSelectedId is the customerid the user selected. Why can't I
set the DataValue of customerid in this way, and how could I do it?
Thanks in advance!
-Ernst
- Posted by Peter Lynch on July 24th, 2006
I'm not a Jscript expert, but you need to set the customer object type as
well, otherwise CRM does not know if the customer is an Account (object type
1) or a Contact (object type 2)
Peter
"Ernst Kuschke (C# MVP)" <ernst.k@gmail.com> wrote in message
news:1153737018.036551.62740@h48g2000cwc.googlegro ups.com...
- Posted by Michael Höhne on July 24th, 2006
Look at the very bottom of
http://www.stunnware.com/crm2/topic....tSideScripting.
--
Michael
http://www.stunnware.com/crm2
----------------------------------------------------------
"Ernst Kuschke (C# MVP)" <ernst.k@gmail.com> schrieb im Newsbeitrag
news:1153737018.036551.62740@h48g2000cwc.googlegro ups.com...
- Posted by Ernst Kuschke (C# MVP) on July 24th, 2006
Great! Thanks Michael, it works like a charm.
Awesome resource - thanks for the link.
Michael Höhne wrote: