• gaga SFDC
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
Hi All,
In lighting conponent's controller i have this code and i have a problem here that if i remove the if- condition then the callback return success and working fine but if not remove the if-condition then return error. All the consoles are also printing.
what am i doing wrong here ?

var validd = helper.validate(component,event);
        console.log('validd= '+validd);    // return true and all consoles are called
        if(validd){
            console.log('inside validd - if');
            var action = component.get("c.saveRecord");

             console.log('newCustBillObj='+newCustBillObj);
             console.log('newCustSoObj='+newCustSoObj);
            
            action.setParams({ "objCustBill" : newCustBillObj,   "objCustBillSO" : newCustSoObj   });
            action.setCallback(this, function(response){
                var state= response.getState();
                var result = response.getReturnValue();
                if(state === "SUCCESS"){                                    
                    alert('save-Record= '+result);
                }
                if(state === 'ERROR'){
                    alert('error in saving Record= '+result);
                }
            });
            
              
 console.log('before - enqueueAction');
            $A.enqueueAction(action); 
                
console.log('after - enqueueAction');
        }

<h1> pls help </h1>
hi
 this the first time i am using ANT, dont know how to use it plz tell me step by step if possible
 query = 'Select ' + CorrespondingFields + ' from ' + AllObjectsList;

Here,  object and fields of that object both are dynamic.
pls help how to display records in table on visualforce page.
Hello,
i am not able to display duplicate record on vf page.
plz help
hello,
i have a situation that i want to use previous record's picklist status in new record
 query = 'Select ' + CorrespondingFields + ' from ' + AllObjectsList;

Here,  object and fields of that object both are dynamic.
pls help how to display records in table on visualforce page.
Hello,
i am not able to display duplicate record on vf page.
plz help
hello,
i have a situation that i want to use previous record's picklist status in new record