Value of "Reason for Rejection" cannot be blank or null. Please select a valid value.
I'm customizing APINV (Invoice Approval Workflow)
Before customization :
when Invoice is approved,approver comments is optional and we can approve the invoice with or without comments by clicking APPROVE button
Approver functionality is same as before.We've a new attribute "Reject for Reason".It's LOV with five values and as per requirement we're deisplaying null value by default.
I created new attribute "Reason for Rejection",Created LOV with four values and I assigned this LOV to Reject for reason attribute
Default Type :Constant
Value : <None>
I didn't modify any code and when I tested this by eneteriing approver comments and after pressing approver button :
I'm getting the error : Value of "Reason for Rejection" cannot be blank or null. Please select a valid value.
I should get above error only when I click on reject button with default value Null/<none>
If I understand it correctly, I gather that you are creating a Lookup type with some values and the default value selected is none. So, when you approve the notification, the value of "Reason for Rejection" Lookup attribute is null or blank. In Oracle Workflow, Notifications, there can not be a null/blank value entered for a Non-Result type Respond attributes of type Lookup when a notification is responded to and hence the validation error shown.
Please have some pre-defined value like "None" etc when there is no reason for rejection mentioned, rather than having a null/blank value.
If user click on approve button with or without entering comments it should approve the invoice as approve is optional
If user click on reject button without entering values for reject comments it should raise error as reject comments are mandatory
For this :
I created LOV for reject wth four possible values 'Test1','Test2','Test3','Test4' and made 'Test1' as default.If user won't select any value in reject LOV and click on reject button then I'm updating wf_notification_attributes tables by nullifying text_value as I don't see any alternate.
The problem I'm facing now is if I approve with or without comments :I'm getting "Value of "Reason for Rejection" cannot be blank or null. Please select a valid value"
I don't know from where I'm getting this message.I need to either suppress this message or click and approve without any errors