function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MisbahTehseen Parathanalli 3MisbahTehseen Parathanalli 3 

i am creating a record by taking input from a form which has few fields as picklists but when i am accessing the value in an attribute of the object it is failing to create the record, else it is working fine?

i am creating a record by taking input from a form which has few fields as picklists but when i am accessing the value in an attribute of the object it is failing to create the record, else it is working fine? 
this is part of the code where i am saving thr value in field:-
                        <lightning:select name="select1" label="License" aura:id="itemform" value="{!v.newUser.License__c}">
                           <option value="">-Select License Type-</option>
                            <option value="1">Chatter External</option>
                            <option value="2">Chatter Free</option>
                            <option value="3">Salesforce</option>
                            <option value="4">Salesforce Platform</option>
                        </lightning:select>


i have given the same options in the main field of the object as well. Please advice an alternative or a solution for this code.
MisbahTehseen Parathanalli 3MisbahTehseen Parathanalli 3
It is giving the "Error in $A.getCallback() [response is not defined] Callback failed: apex://createUserRecord/ACTION$createUserRecordNew Failing descriptor: {c:newTest}"
Meghna Vijay 7Meghna Vijay 7
Hi,
Can you post controller.js code ?
Thanks
MisbahTehseen Parathanalli 3MisbahTehseen Parathanalli 3
  ({
 save : function(component, event, helper) {     
     var action = component.get("c.createUserRecordNew");
            action.setParams({"UR":component.get("v.newUser")});
            action.setCallback(this,function(result){
            component.set("v.isShow",false);
            var userId = result.getReturnValue();
            alert('userId'+userId); 
        });
         $A.enqueueAction(action);
 }
})


Thanks,