• Colince
  • NEWBIE
  • 25 Points
  • Member since 2018
  • Developper
  • Talan Solutions

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hello, 
I have been trying to login to DevHub using CLI but weirdly, when I use the force:auth command, the browser doesn't even open. I am very new to using the CLI and please let me know if I'm missing something.

Thanks in advance!
Hi, 
I got the above error while trying to "Create an Indicator Badge Apex Service "
And the code of INDICATOR_Controller  shown as below 
public class INDICATOR_Controller {
    private static SObject sobj;
    @AuraEnabled
    public static String getSObjectLabel(String sObjName){
        String label = Schema.getGlobalDescribe().get(sObjName).getDescribe().getLabel();
        return label;
    }
    @AuraEnabled
    public static List<INDICATOR_Service.Indicator> getIndicators(String recId, String objectName){
        getSObject(recId, objectName);
        if(sobj != NULL){
            List<INDICATOR_Service.Indicator> indicators = INDICATOR_Service.getIndicatorBadgesForObject(sobj);
            return indicators;
        } else{
            return null;
        }
    }
    public static void getSObject(String recId, String objectName){
        List<String> fNames = INDICATOR_Service.getFieldsToQueryForObject(objectName);
        if(fNames.size() > 0){
            String query = 'SELECT Id,'+ String.join(fNames,',')+' FROM '+ objectName +' WHERE Id =\''+ recId +'\' LIMIT 1';
            List<SObject> results = Database.query(query);
            if(results.size() == 1){
                sobj = results[0];
            }
        }
    }
}

Please Help!

Thanks,
Sneha M.