on 2014 Sep 24 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
Request clarification before answering.
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
User | Count |
---|---|
22 | |
21 | |
4 | |
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.