cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a field as a mandatory for specific business roles in crm web ui

Former Member
0 Kudos

HI All,

         I need to make a field as a mandatory for specific business roles through logic. Please let me Know ASAP.

Thanks,

Santhosh Kumar.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi santosh,

Copy the configuration and give your Role ConfigKey.Now in configuration tab in your configuration press ALT+Click on the attribute and select mandatory in the checkbox.

Regards

Bharadwaj

Former Member
0 Kudos

Hello Santosh,

                         You can achive your requirement by creating configuration for particular business role based on 'Role Config Key ' and in that configuration check the field as mandatory which you want as mandatory or you can write the code in .htm page by getting the logged in business role as suggested by 'Anju Garg ' and set the properties of field which you want as mandatory.

Regards,

Santosh Redy

Former Member
0 Kudos

Hi,

You can use ui configuration tool to achieve this..

Former Member
0 Kudos

Hi

You can use below method to check the busines role

Data: lr_ui_profile type ref to IF_CRM_UI_PROFILE,

lv_profile TYPE CRMT_IC_CONFIGPROF.

lr_ui_profile = cl_crm_ui_profile=>get_instance( ).

lv_profile = lr_ui_profile->get_profile( ).

lv_profile will give you business role.

you using do

if lv_profile = 'abc'.

set_property method to chane field properlt as required..

endif.

0 Kudos

Hi Santhosh,

You can achieve this by creating a separate view configuration for the particular business role and make the corresponding field mandatory in this configuration. And in other normal configuration, I suppose the field is not mandatory.

If the use case you are talking is a business transaction(sales order, opportunities etc..), then you can implement the method CHECK_BEFORE_SAVE in the BADI ORDER_SAVE. In case the logged in user has this particular Business Role and if the mandatory field is not filled, do RAISE do_not_save with the corresponding message.

Thanks & Best Regards,

Leon