• Aaqib Niaz 5
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I have a picklist which gives the below error when trying to select a value.
User-added image
Component:
<lightning:select aura:id="Productreg" name="select" label="Gender" onchange="{!c.onSelectChange}">
                        <option value="">choose one...</option>
                        <option value="male">Male</option>
                        <option value="female">Female</option>

Controller:
 onSelectChange: function (cmp, evt, helper) {
        //alert(cmp.find('select').get('v.value') );
        
        var genderVal = cmp.find('select').get('v.value');
        cmp.set('v.genderVal',genderVal);
        
    },
    afterload: function (cmp, evt, helper) {
        alert('new function test' );
        
        
        
    },
    handleCreateProductReg: function (cmp, evt, helper) {
        
        var CreatePassableItem = component.get('c.CreatePassableItem');
        $A.enqueueAction(CreatePassableItem);
        console.log(CreatePassableItem);
        
        var prodObj = cmp.get("v.ProductRegObj");
        console.log(prodObj);
        var genderVal = cmp.get("v.genderVal")?cmp.get("v.genderVal"):''; 
        prodObj.Gender__c = genderVal;
 
I have a picklist which gives the below error when trying to select a value.
User-added image
Component:
<lightning:select aura:id="Productreg" name="select" label="Gender" onchange="{!c.onSelectChange}">
                        <option value="">choose one...</option>
                        <option value="male">Male</option>
                        <option value="female">Female</option>

Controller:
 onSelectChange: function (cmp, evt, helper) {
        //alert(cmp.find('select').get('v.value') );
        
        var genderVal = cmp.find('select').get('v.value');
        cmp.set('v.genderVal',genderVal);
        
    },
    afterload: function (cmp, evt, helper) {
        alert('new function test' );
        
        
        
    },
    handleCreateProductReg: function (cmp, evt, helper) {
        
        var CreatePassableItem = component.get('c.CreatePassableItem');
        $A.enqueueAction(CreatePassableItem);
        console.log(CreatePassableItem);
        
        var prodObj = cmp.get("v.ProductRegObj");
        console.log(prodObj);
        var genderVal = cmp.get("v.genderVal")?cmp.get("v.genderVal"):''; 
        prodObj.Gender__c = genderVal;
 
I have data coming from API in one Single field: 
Customer Information : Ben Matthew, Xtream. Inc., benmatthew@Xtream.com

I want to update this value in 3 different fields on a different object:
Name = Ben Matthew
Company = Xtream. Inc.
Email - benmatthew@xtream.com

how do I go about doing this?

Any help will be highly appreciated.