+ Start a Discussion
dlCamelotdlCamelot 

Lightning Parameter Search Attempt

I'm trying to pass a string parameter to an Apex Controller then do a fuzzy SoQL search (% like % ) to find accounts with similar names.  Here's the code so far...

Lightning Controller:
buttonSearch : function(component, event, helper){
        var companyName = component.find("CompanyName").get("v.value");
    },

Apex Controller: 
Public Static void nameToSearch(String companyName){
        system.debug(companyName);
    }

How do I:
1) Bind the js controller parameter to apex?
2) execute the search in apex?  record ids should be the result.