on 09-24-2014 9:25 AM
Hi Experts,
I am doing some validations in Before change method crm_order_status Badi
If validation fails status should not be changed. For that iam raising exception RAISE not_allowed.
But it doesnt work.
Could anybody help in this issue?
Thanks,
Anil
Hi,
To my understanding, BEFORE_CHANGE is not intended to validate a status change after the status has been selected by the user. I use BEFORE_CHANGE to filter the list of available status so the user cannot select the status from the list.
If you set a breakpoint in your implementation you will see it is called once per customized status. If you raise exception not_allowed the status is deleted from the list.
Best regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
The exception works fine, but I guess the Badi doesn't fit to your requirement.
As I said, the system calls BEFORE_CHANGE several times (once per Status) when the list of selectable status is created in the UI - flt_val contains the status checked in the current call. If you raise exception NOT_ALLOWED the status contained in flt_val will be omitted and the next status will be checked.
This allows removing a status from the list under some conditions although it is allowed by the status procedure.
Best regards,
Frank
Thanks Krishnan and Faisal for responses.
if quote has system error status and user chnages the user status it should not be allowed
Ya.I checked that implementation.
Exception is fine But even after calling that exception quote status is changing to new status.
My question is this exception not restricting the status change.
Thanks,
Anil
Hi,
Check the implemented badi is active are not. If you raise the exception in that method definitely an error message will be thrown and the status will not set.. other wise check the logic you have written and check the exception is getting raised are not
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Anybody faced this kind of issue?
Thanks,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.