You need to sign in to do that
Don't have an account?
ShaT
Bad value for restricted picklist field: Read/Write INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST
HI All ,
I am facing a issue reagrding the field update from apex.
System.DmlException: Update failed. First exception on row 0 with id 800c00000001DvXAAU; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, Status: bad value for restricted picklist field: Active: [Status]
I have provide all the permissions for the field. but still facing the above issue.
Please help!!!..
Thanks
Shailu
I have resolved the issue. The error was occurring because the pick-list value i was inserting from code was not there. so it was giving me above error.
All Answers
I have resolved the issue. The error was occurring because the pick-list value i was inserting from code was not there. so it was giving me above error.
I'm facing this issue despite the fact that , I have uncheck the option "Strictly enforce picklist values" on the dependent field. Following is the code which throws this error in PRODUCTION Org , however the passes the testing in SANDBOX :
@istest(SeeAllData=true) private class TestEmailAlertsForQoute { static testmethod void test() { Test.startTest(); Account acc = new Account(name='acc1'); insert acc; Opportunity oppr = new Opportunity(); oppr.AccountId = acc.ID; oppr.Annual_Contract_Value_ACV__c = 111; oppr.BU__c = 'MJ'; oppr.CloseDate = Date.today(); oppr.Contract_Opportunity_Estimate_CoE__c = 111; oppr.Total_Contract_Value_TCV__c = 111; oppr.Name = 'SubmitforQuoteApproval'; oppr.StageName = 'Prospecting'; oppr.Date_on_Opportunity_Prospecting_Stage__c = Date.today(); insert oppr; oppr.Region__c ='North'; oppr.Responsible_Sales_Rep__c ='Siddharth Bhatia'; update oppr; Quote quot1 = new Quote (); quot1.Name = 'TestPropForSandbox2016-10'; quot1.Status ='Draft'; quot1.OpportunityId = oppr.id ; insert quot1; quot1.Status = 'Acceptance by Client'; update quot1 ; Test.stopTest(); } }
Any help resolving the error : System.DmlException: Update failed. First exception on row 0 with id 0066F00000jPi87QAC; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: Siddharth Bhatia: [Responsible_Sales_Rep__c]
Stack Trace: Class.TestEmailAlertsForQoute.test: line 24, column 1
Regards,
Debendra
Basically, had to make sure the record types were assigned to the picklist values.
I resolved the error while uncheckng the option "Restrict picklist to the values defined in the value set" for picklist.
give a try it may solve the issue