How to set the requirement level for a field

Konrad Viltersten

Following this blog I'm trying to set the requirement level to business recommended but I fail miserably. I only get the the red star indicating that the field is business required.

crmForm.SetFieldReqLevel("new_bamsegurka", 0);
crmForm.SetFieldReqLevel("new_bamsegurka", 1);    
crmForm.SetFieldReqLevel("new_bamsegurka", 2);

The first line turns the red star off. The other two, turn it on. There's no seemingly way to set the blue cross, though... What do I miss?

Guido Preite

As you already found the right code to set a field business recommended (blue cross) is with parameter 2

crmForm.SetFieldReqLevel("new_bamsegurka", 2);

It can be an issue with the rollup of your CRM 4.0 environment. I saw a similar bug (a required didn't set properly by javascript) with a CRM 2011 with an early rollup.

For the corresponding operation of getting requirement level of a field, there's no supported method. One needs to hack around as follows.

crmForm.all["new_bamsegurka_c"].className.indexOf("Rec") >= 0

Note the _c part as well as Rec, as opposed to Req.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to set isolation level

From Dev

How does NSIS set section's size requirement automatically?

From Dev

How to set window level in Swift

From Dev

How to set Outline Level programmatically

From Dev

How can you satisfy Google's requirement to enforce SafeSearch at the network level?

From Dev

Conditional field requirement with DjangoRestFramework serializer

From Dev

How to know if field is masked due to field level security?

From Dev

How to know if field is masked due to field level security?

From Dev

How to freeze a requirement with pipenv?

From Dev

How to filter for my requirement?

From Dev

How to set value to a JPassword field?

From Java

How to set focus on input field?

From Dev

How to know if a field is set to NULL

From Dev

How to set DateTime field as not required?

From Dev

how to set the field in sqlite db?

From Dev

How to set DateTime field as not required?

From Dev

How to set custom ID field?

From Dev

how to set field in constructor in java

From Dev

How can I set a logging level with Express?

From Dev

How to set up a guard at the state level in AASM

From Java

How to set a boolean at controller level in springboot?

From Dev

Django: how to set log level to INFO or DEBUG

From Dev

How to set authorization on View level in Vaadin

From Dev

How to set android target level 21

From Dev

How do I set the logging level for HikariCP?

From Dev

Python zipfile, How to set the compression level?

From Dev

How to set zoom level to user location in MapView

From Dev

How to set the SNAPSHOT isolation level in Spring

From Dev

How to set DEBUG log level for ResourceManager?