Hello,
I am still fairly new to javascript so I apologise for my lack of knowledgein advance. I have a multiple line of text field "new_mlt" on my account entity form, when I select a specific value in a optionset "new_optionset" it pulls through some basic text. This works fine. However what I am looking to do is add a date field from the form into the basic text on change event: below is my current code, can anyone point me in the right direction about the method required:
function addtext(){
if (Xrm.Page.getAttribute("new_optionset").getSelectedOption() == null)
{
Xrm.Page.getAttribute("new_optionset").setValue("");
}
if(Xrm.Page.getAttribute("new_optionset").getSelectedOption() != null)
{
if(Xrm.Page.getAttribute("new_optionset").getSelectedOption().text =="A. Value 1")
{
Xrm.Page.getAttribute("new_mlt").setValue("add basic text from this date >> XX/XX/XXXX");
}
}
}
Where I have the XX/XX/XXXX above this is where I need a date field inserting from the form, IE: "new_datefield".
Many Thanks
Adam