Hi Tamilarasu,
Thank you for your help, I got my script and it's working now. Can you pls suggest me how to write the same script using array concept? as it will enhance the script.
I am pasting my script here, pls tell me how to achieve using array
var B_line = window.B_line || {};
(function() {
this.formOnLoad = function (executionContext){
var formContext = executionContext.getFormContext();
var businessarea = formContext.getAttribute("new_buniessarea21").getValue();
var businessline = formContext.getAttribute("new_buniessline21")
if (businessarea == "Edge")
{
businessline.clearOptions();
businessline.addOption({value: 100000000, text: 'Hardware'});
businessline.addOption({value: 100000001, text: 'Software'});
businessline.addOption({value: 100000002, text: 'Services'});
}
if (businessarea == "Core")
{
businessline.clearOptions();
businessline.addOption({value: 100000000, text: 'Hardware'});
businessline.addOption({value: 100000001, text: 'Software'});
businessline.addOption({value: 100000002, text: 'Services'});
businessline.addOption({value: 100000003, text: 'Software Subscription'});
}
if (businessarea == "Cloud")
{
businessline.clearOptions();
businessline.addOption({value: 100000001, text: 'Software'});
businessline.addOption({value: 100000002, text: 'Services'});
}
}
}).call(B_line)