Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 285 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display an option set for a field based on selection of previous field

#1
I have a option set column called "Business Unit" in Micrsoft Dynamics CRM and the options are

"Edge"
"Core"
"Cloud"

Then I have another option set column called "Business category" and the options are

"Hardware"
"Software"
"Services"

If I select any option on "Business Unit" then the dropdown from "Business Category" should pop up based on the option, I selected in "Business Unit"

For eg:-

1. If I select "Edge", then only "Hardware" should pop up

2. If I select "Core" then "Hardware" and "Software" should pop up

3. If I select "Cloud" then "Hardware" and "Software" and "Services" should pop up


We are trying with JScript in CRM, but it is showing some error. Can anyone help me out how to write a script to achieve this process. I have to do this on priority.

If I select any option on "Business Unit" then the dropdown from "Business Category" should pop up based on the option, I selected in "Business Unit"

For eg:-

1. If I select "Edge", then only "Hardware" should pop up

2. If I select "Core" then "Hardware" and "Software" should pop up

3. If I select "Cloud" then "Hardware" and "Software" and "Services" should pop up

I tried writing using array but its showing error.

My code: -

var B_line_arr = window.B_line_arr || {};

(function() {

this.formOnLoad = function (executionContext){

var formContext = executionContext.getFormContext();

var businessarea = formContext.getAttribute("new_buniessarea21").getText();

var businessline = formContext.getAttribute("new_buniessline21")

if(businessarea=="Edge")

{

var arr = [{value: 100000000, text: 'Hardware'},

{value: 100000001, text: 'Software'},

{value: 100000002, text: 'Services'}];

for(var i=0;i<=arr.length;i++)


{

businessline.clearOptions();

businessline.addOption({value: arr[0].value, text: arr[0].text});
}
}
}
}).call(B_line_arr)
```
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through