Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Concatanate an Option Set - CRM 2011

$
0
0

Dear all

Im fairly new to this Java Scripting lark, and trying to learn as I go along.  That all said, I have an idea but Im not sure how to do it.

I have two option Sets:

The first is months: January, February,....., December  (the option set is called MonthField)

The second is years: 2009, 2010, 2011......  (the option set is called YearField)

What I want to do is to have an on change event on these two option sets, that then populates a date field (DateField) with the 1st of whatever the Month and Year is.

So this was my attempt at the code

function ConcatDate()
{
    var Month = Xrm.Page.getControl("MonthField").getAttribute();
    var Year = Xrm.Page.getControl("YearField").getAttribute();

    Var NewDateVal = "1/+Month+/+Year";

//and then I cant work out how to set the date field to NewDateVal

    }

Any help will be gratefully recieved.

ta

Lee


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>