your @AuraEnabled method returns Account instance(you mentioned you would limit it to 1) which contains Name and Id.
Once you get the response, it will be an JSON Object, which can be retrieved by calling the getReturnValue()
.
{
"Name":"Test Account",
"Id":"001XXXXXXX"
}
Since above is an JS Object, you could the values of using . notation. Also make sure you are trying to use the field's API correctly, since everything in lightning is case-sensitive.
Entersite : function(component, event, helper) {
var action = component.get("c.getAccount");
action.setCallback(this,function(response){
if (component.isValid() && response.getState() === "SUCCESS"){
window.location.href = "https:\\www.google.com?id="+response.Id+"&Name="+response.Name;
}
});
$A.enqueueAction(action);
}
NOTE : Also for every async callback's it is recommend to check if the component exist by doing component.isValid()
window.location.href="https://www.google.com"
?one/one.app
or standalone app(eg:myappname.app)