Skip to Content
0
Mar 12, 2013 at 10:34 AM

Unable to create an entity for a particular user

22 Views

Hi,

We have Z-component and in DO_PREPARE_OUTPUT method of a custom view we have this following piece of code:

lr_entity ?= me->typed_context->btadmini->collection_wrapper->get_first( ).

entity ?= lr_entity->get_related_entity( 'BTItemOrdPrpExt' ).

lr_entity ?= entity->create_related_entity( iv_relation_name = 'BTOrdPrpIProdList' ) .

Say there are two business roles A and B . The issue is for business role A, the method entity->create_related_entity() in the third line is returning no entity , i.e a NULL BOUND but whereas for business role B, the method successfully returns the newly created entity.

Is this because of the authorization objects of A or could there be any other reason.

I have tried to debug this issue by debugging create_related_entity() method, and found that inside CL_CRM_BOL_CORE->CREATE_RELATED_ENTITY(), the following line is returning FALSE instead of TRUE.

check GET_LOCK( IV_ENTITY ) = TRUE.

Please let me know why this is happening only with the user with business role A and not with the user with business role B.

Thanks,

San