- Jscript or workflow
- Posted by New to this on September 7th, 2006
Jscript or workflow
Is there away to change the Value of a Field Automatically via a jscript or
Workflow?
E.g. .one field is source (Picklist) (yahoo, google, msn, Micrsoft) than
when I select one of them it should populate the next field called webpage
with the URL of which ever one was selected
- Posted by Michael Höhne on September 7th, 2006
That's possible. Look at http://www.stunnware.com/crm2/topic.aspx?id=JS4 for
a variety of JavaScript code examples. Especially look at "Calculating a
date field based upon the selection of a picklist", which is almost the code
you need. It's dealing with Date values, but you should get the point.
--
Michael
http://www.stunnware.com/crm2
----------------------------------------------------------
"New to this" <New@news.microsoft.com> schrieb im Newsbeitrag
news:uygiihl0GHA.328@TK2MSFTNGP06.phx.gbl...
- Posted by New to this on September 7th, 2006
Thank you Michael
Im Lost When it Comes to JScripting
Please give me an Example
"Michael Höhne" <michael.hoehne@nospam.nospam> wrote in message
news:O$rYULm0GHA.4228@TK2MSFTNGP06.phx.gbl...
- Posted by Michael Höhne on September 7th, 2006
Maybe this is easier.
var text;
switch(crmForm.all.<name of pciklist field>.SelectedText) {
case "Yahoo":
text = "Yahoo selected";
break;
case "Google":
text = "Google selected";
break;
case "MSN":
text = "MSN selected";
break;
}
crmForm.all.<name of text field>.DataValue = text;
--
Michael
http://www.stunnware.com/crm2
----------------------------------------------------------
"New to this" <New@news.microsoft.com> schrieb im Newsbeitrag
news:eyf8fAo0GHA.4116@TK2MSFTNGP02.phx.gbl...
- Posted by New to this on September 8th, 2006
Thx Mich
This Script works, But as soon as I put in more information it just dont
work .Please help have a LOOK at the Scripts.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
WORKING ONE
var URL;
switch(crmForm.all.new_typewebpage.SelectedText) {
case "Yahoo":
text = "Yahoo selected";
break;
}
if (text !=0) {
var URL = "www.yahoo.com";
crmForm.all.new_webpage.DataValue = URL;
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@
Not working properly
every time if I select Yahoo it goes to www.goole.com and if I select Google
it goes to www.google.com
var URL;
switch(crmForm.all.new_typewebpage.SelectedText) {
case "Yahoo":
text = "Yahoo selected";
break;
case "Google":
text = "Google selected";
break;
}
if (text !=0) {
var URL = "www.yahoo.com";
}
{var URL = "www.google.com";
crmForm.all.new_webpage.DataValue = URL;
}
"Michael Höhne" <michael.hoehne@nospam.nospam> wrote in message
news:ORJRWxo0GHA.3656@TK2MSFTNGP04.phx.gbl...
- Posted by Michael Höhne on September 8th, 2006
var URL;
switch(crmForm.all.new_typewebpage.SelectedText) {
case "Yahoo":
URL = "www.yahoo.com";
break;
case "Google":
URL = "www.google.com";
break;
}
crmForm.all.new_webpage.DataValue = URL;
This will also remove the value from the new_webpage field, if nothing is
selected in the new_typewebpage picklist.
--
Michael
http://www.stunnware.com/crm2
----------------------------------------------------------
"New to this" <New@news.microsoft.com> schrieb im Newsbeitrag
news:uFIBZHz0GHA.4772@TK2MSFTNGP03.phx.gbl...
- Posted by New to this on September 8th, 2006
Brillianttttttttttttttttttttttt
"Michael Höhne" <michael.hoehne@nospam.nospam> wrote in message
news:eQqSgF00GHA.1288@TK2MSFTNGP03.phx.gbl...
- Posted by New to this on September 8th, 2006
what if I want to open that URL in a IFRAME
"Michael Höhne" <michael.hoehne@nospam.nospam> wrote in message
news:eQqSgF00GHA.1288@TK2MSFTNGP03.phx.gbl...
- Posted by Michael Höhne on September 8th, 2006
crmForm.all.IFRAME_<name of iframe>.src = "http://www.yahoo.com";
--
Michael
http://www.stunnware.com/crm2
----------------------------------------------------------
"New to this" <New@news.microsoft.com> schrieb im Newsbeitrag
news:ONx%23iM00GHA.4108@TK2MSFTNGP04.phx.gbl...