Skip to Content
0
Former Member
Jul 21, 2008 at 01:10 PM

Problem with BAdI CRM_ORDER_AUTH_CHECK~CRM_ORDER_ADD_AUTH_CHECK

347 Views

Hi all,

We are on crm 2006s (aka CRM 5.2).

We are trying to do some advanced authorization restrictions via badi CRM_ORDER_ADD_AUTH_CHECK. We managed to make the authorisations check work correctly + we managed to raise an error message to users. The code raising the error message is this:

"MESSAGE E018(YCRM) raising NO_AUTHORITY."

Our problem is described most easily via an example:

1) In the CRM WebClient the user searches for opportunities and get a result list of e.g. three opportunities.

2) He then clicks on one of them which takes him to a new screen (component BT111H_OPPT, view DetailsOV). However, the Badi has recognized that he is not allowed to display this opportunity so all fields contain no data + error message is raised. So until now everything is working as expected.

3) He clicks the back button and jumps back to the opportunity search result list.But the error message raised via the Badi is still shown.

4) He then clicks on another opportunity (one which he is allowed by the badi to acccess). This takes him to the opportunity and he sees all data correctly. But the error message triggered by the previous access to the other opportunity is still visible. And it does not disappear until the user jumps away from the opportunity area (e.g. by clicking on the Home button in the navigation bar).

Is this a bug or are we doing something wrong? We tried deleting the message manually via FM CRM_MESSAGES_DELETE_SINGLE but that unfortunately has no effect. It only seems to work if the message has been raised via the FM CRM_MESSAGE_COLLECT. We cannot use CRM_MESSAGE_COLLECT since our apparently message has to be raised together with the statement "raising NO_AUTHORITY". If not we get the error message shown twice.

I hope you have some hints 😊

Br,

Anders