cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set field , error Entity is read-only field or a display mode violation

AB069
Active Participant
0 Kudos

Hi Frds,

I trying to set a field with new value in Set method of an attribute. but i unable to update it .because its show entity is in display mode or uneditable mode. Below is the code am using. please help me out.its urgent.

 

if gv_name ns value.

lr_shipadd1->SWITCH_TO_CHANGE_MODE( ).

lr_shipadd1->set_property_as_string(

iv_attr_name = 'DESCRIPTION_NAME'

iv_value = value ).

endif.

Thanks

Imran

Accepted Solutions (0)

Answers (7)

Answers (7)

AB069
Active Participant
0 Kudos

Thanks Frds..I resolve the issue.

Former Member
0 Kudos

Hello Imran, 

Could you please share the logic you wrote for this.

Regards,

Qiong

Former Member
0 Kudos

Hi Imran,

Please can you tell me how you resolved this issue. I am facing the same issue like this.

Thanks,

Shyam K Gangisetti

AB069
Active Participant
0 Kudos

Hi Frds,

As suggested i have made the field changeable at genil level. But it doesnt change anything,still its not update new value.

Below are the Change details. pls correct if am wrong .  My Object is BTPartner.

Genil Class :CL_CRM_PARTNER_RUN_BTIL

Method :  MOD_ATTR_PROPS

Changed Field propety to changeable i.e 'A'.

Once thing i notice when View is update this Method is trigerring but when my set_property_as_string method is executing the control is not going to this method.

Please do the needful.

Thanks

Imran

sumeet_gehlot
Contributor
0 Kudos

Hi,  Can you tell me your component name , view and field name  Regards, Sumeet

AB069
Active Participant
0 Kudos

Hi Sumeet,

compoent BT115H_SLSO and view is Details.It is a enhance component and zcontext node added to Details view.

I am new to CRM , I have one confusion ,One strange thing i notice that Base entity of this context node is BTpartnerAddr but it get bind to BTpartner of custom controller., Can it be possible. Two differnent BOL can Bind.?. Also when i check this context node its show object BTPartner only. 

Thanks

Former Member
0 Kudos

Hi Imran,

       I think both the context nodes are same. They refer to the same object. Find the bol object name's of both the context nodes in view and custom controller.

If you are working on EHP1 you can find the name beside the context node name, In before versions you need to double click on the implementation class of context node and in attributes tab there will be an attribute BASE_ENTITY_NAME check its default value, i.e the bol object name of your context node.

Regards,

Krishna.

sumeet_gehlot
Contributor
0 Kudos

Hi,

Base entity must be same to create a binding. BTpartnerAddr can be binded by same base entity with custom controller.

if your a requirement is to change a standard field is only possible if your genil field properties is in changeable mode.

check your genil field property at genil level.

Regards,

Sumeeet

Former Member
0 Kudos

Hello Imran,

 

In the Genil of this COmponent , put a break point in the SET_ATTR_PROPERTIES , here they will be explicitly changing the Property of this field to Read only.

This Setting in this Method dominates and cannot be changed.

If you want to change it, i have an approach which i followed in my Project. If you want i can guide you in this. Let me know .

Thanks and Regards,

Nikhil Kulkarni

AB069
Active Participant
0 Kudos

Thanks Nikhil.

Please go ahead.I really in need of advice

Wellcome to all your suggestion.

AB069
Active Participant
0 Kudos

Hi Poonam, Harish.

I need to set the new values into the entity if user change the fields contant in view.

I made the view editable through Get_I method, but when am trying to set the value in GET_XXX method, its not updating it because its show entity is  read-only field or display mode in genil level.

So it can be solved if we can made entity changeable. Please suggest how can we make it changeable.

Harish: How can we made to changeable field at Genil level.

Thanks

Imran

former_member188770
Active Participant
0 Kudos

Hi Imran,

Can you please give further details of exactly what you are trying to do .

Is it just that you want to display description of the field in the web ui ?

Thanks,

Poonam

former_member188098
Active Contributor
0 Kudos

check the field property at genil level whether it is changeable or not.

regards,