• 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 5
I have installed salesforce cli windows 64 bit and I also installed it through npm globally. 
I am on windows 7 machine and behind a company firewall and I have proxy set on my computer

C:\Users\XXXXX>sfdx update
panic: Get https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channe
ls/stable/windows-x64: dial tcp XX.XX.XX.XX:443: connectex: A connection att
empt failed because the connected party did not properly respond after a period
of time, or established connection failed because connected host has failed to r

goroutine 1 [running]:
panic(0x6632a0, 0xc0420067b0)
        /usr/local/go/src/runtime/panic.go:500 +0x1af
main.must(0x7b92c0, 0xc0420067b0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/io.go:115 +0x63
main.GetUpdateManifest(0x6a4875, 0x7, 0x6a3c0d, 0x3, 0x7b92c0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:104 +0x2
main.GetUpdateManifest(0x6a4875, 0x7, 0x6a3c0d, 0x3, 0x0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:102 +0x2
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/install.go:33 +0x10
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/main.go:18 +0x3a

When i Ran test Class I Am getting the issue.
Class.System.JSON.deserializeUntyped: line 11, column 1
Class.GroupAndEntitiesExtension.getEntityData: line 182, column 1
Class.GroupAndEntitiesExtension_Test.GroupAndEntitiesExtension_Test: line 77, column 1

Apex Class:- 

global class GroupAndEntitiesExtension {
    public String eListData{get;set;}
    public String eListDataEdit{get;set;}
    public string groupId{get;set;}
    public string inputvalue{get;set;}
    public list<WrpperGroups> groupsearchlist{get;set;}
    public boolean showtable{get;set;}
    public Integer rowIndex {get;set;}
    public list<odm__C> deleteOdmrecords;
    public list<capital__C> deleteCapitalrecords;
    public list<ownership__c> deleteOwnershiprecords;
    public odm__c od;
    public capital__C captl;
    public Ownership__c ownrs;
    Public Service_Request__c serviceRequest{get;set;}
    public List<ODM__c> ODM {get;set;} 
    public List<Capital__c> capital {get;set;}
    public List<Ownership__c> Ownership {get;set;}
    public string groupsearchname{get;set;}
    public Boolean isGuestUser{get;set;}
    public String operation {get;set;}
    public String title {get;set;}
    public string conid{get;set;}
    public Id caseId;    
    public Boolean showFeed{get;set;}// to simulate standard feed functionality
    public transient Cookie feedCookie{get;set;}// to simulate standard feed functionality
    public Boolean feedView{get;set;} //Need to be removched
    Case caseRecord;
    public String serviceReqAction {get;set;}
    public List<SelectOption> servReqActionList{get;set;}
    public string groupaccountId{get;set;}
    List<entity__c> entitylist;
    public List<String> alphabets{get;set;}
    List<WrpperGroups> Tempwrapperlist= new List<WrpperGroups>();
    public List<Service_Request_Entity_Junction__c > entityViewtable{get;set;}
    public Boolean showGroupAndEntitiyTable{get;set;}
    public Boolean showGridError{get;set;}
    public String jsonEntityResponse{get;set;}
    public List<WrpperEntities> jsonEntitiesSelectAll;
    public GroupAndEntitiesExtension(ApexPages.StandardController stdcontroller){ 
        entitylist = new List<entity__c>();
        eListData =''; eListDataEdit = '';
        entityViewtable=new List<Service_Request_Entity_Junction__c>(); 
        od = new ODM__c();
        captl = new capital__C();
        ownrs = new Ownership__c();
        ODM = new List<ODM__c>();
        Capital = new List<Capital__c>();
        Ownership = new List<Ownership__c>();
        deleteOdmrecords=new List<odm__C>();
        deleteCapitalrecords=new List<capital__c>();
        deleteOwnershiprecords=new List<ownership__c>();
        groupsearchlist= new List<WrpperGroups>();
        alphabets=new List<string>{'All','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};  
            isGuestUser = (UserInfo.getName() == Label.Guest_User);
        showGridError = false;
        system.debug('=========================operation ======='+ApexPages.currentPage().getParameters().get('operation'));
        // logic for new service request
        if(ApexPages.currentPage().getParameters().get('id') == null){   
            operation = 'New';
            serviceRequest = new Service_Request__c();
            serviceRequest.Recordtypeid = Utils.fetchRecordTypeId('Service_Request__c','Entity Update');            
                title = 'New Service Request';
                caseId = ApexPages.currentPage().getParameters().get('caseId');
                caseRecord = [Select Id,Status,caseNumber from Case where Id =: caseId];
                title = 'New Service Request for Case# '+caseRecord.CaseNumber;
            showGroupAndEntitiyTable = false;
        // logic for existing service request
        if(ApexPages.currentPage().getParameters().get('id') != null){   
            operation = 'View';
            showtable = false;
            serviceRequest = (Service_Request__c)stdController.getRecord();
            // to simulate standard feed functionality
            conid =serviceRequest.Contact__c;
            feedCookie = ApexPages.currentPage().getCookies().get('ShowFeedView');
            if (feedCookie == null)
                feedCookie = new Cookie('ShowFeedView','False',null,-1,false);
                showFeed = (feedCookie.getValue() != 'False' );       
            showGroupAndEntitiyTable = false;
        if(ApexPages.currentPage().getParameters().get('operation') == 'Edit'){
            showGroupAndEntitiyTable = true;
            showtable = false;
    public List<Service_Request_Entity_Junction__c > entitytableView(){
        entityViewtable= [select Entity__r.name,Entity__r.Entity_ID__c,Entity__r.Entity_Party_ID__c from Service_Request_Entity_Junction__c where ServiceRequest__c=:serviceRequest.id];
        return entityViewtable;    
    public void handleViewScreen(){
        System.debug('In handleViewScreen===='+ApexPages.currentPage().getParameters().get('id'));
        if(ApexPages.currentPage().getParameters().get('id') != null){  
            //Code to Update the checkboxes if records are added from Related List.
            List<ODM__c> odmListAdded = new List<ODM__c>();
            odmListAdded = [select Id from ODM__c where Service_Request__c =: serviceRequest.Id];
                serviceRequest.ODM__c = true;
                serviceRequest.ODM__c = false;
            List<Capital__c> capitalListAdded = new List<Capital__c>();
            capitalListAdded = [select Id from Capital__c where Service_Request__c =: serviceRequest.Id];
                serviceRequest.Capital__c = true;
                serviceRequest.Capital__c = false;
            List<Ownership__c> ownerListAdded = new List<Ownership__c>();
            ownerListAdded = [select Id from Ownership__c where Service_Request__c =: serviceRequest.Id];
                serviceRequest.Ownership__c = true;
                serviceRequest.Ownership__c = false;
            update serviceRequest;
    global static string getEntityData(String eSearchId){
        //To Do:
        // Create List of Wrapper
        // Get Results 
        // Iterate Through getting Next tag
        // Parse into List of Wrapper()
        // Run call for next result set
        // Add to List of Wrapper
        List<WrpperEntities> groupentitieslist=new list<WrpperEntities>();
        String bodyresp = '';
        if(eSearchId=='' || eSearchId==Null){
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Please select group'));  
        if(eSearchId!='' && eSearchId!=Null){
            List<WrpperEntities> eList = new List<WrpperEntities>();
            Boolean firstRun = true;
            Boolean hasNext = true;
            String nextUrl = '';
            Long startingTime = DateTime.now().getTime(); //track how long this takes
                Long nowTime = DateTime.now().getTime();
                if(nowTime - startingTime > 110000){
                    WrpperEntities we = new WrpperEntities('00','The request for this groups list of entities took an extended amount of time. Please retry getting the entities. If this request continues to fail please contact Support.','','','');
                    bodyresp = APICalloutUtils.getEntityInfo(eSearchId);
                    firstRun = false;
                    bodyresp = APICalloutUtils.getNextEntityInfo(nextURL, eSearchId);
                Map<String,Object> jsonStub = new Map<String,Object>();
                jsonStub = (Map<String,Object>)JSON.deserializeUntyped(bodyresp);
                List<Object> entityJSONList = new List<Object>();
                entityJSONList = (List<Object>)jsonStub.get('entities');
                List<Object> linkObjectList = new List<Object>();
                linkObjectList = (List<Object>)jsonStub.get('links');
                Boolean nextURLFound = false;
                if(linkObjectList != null){
                    for(Object o : linkObjectList){
                        Map<String,Object> linkObjectMap = (Map<String,Object>)o;
                        List<Object> urlNameList = (List<Object>)linkObjectMap.get('rel');
                        String urlName = (String)urlNameList[0];
                        if(urlName == 'next'){
                            nextUrl = (String)linkObjectMap.get('href');
                            nextURLFound = true;
                            system.debug('NEXT URL Link FOR API CALL OUT TO ENTITIES: ==>>' + nextUrl);
                if(nextURLFound == false)
                    nextUrl = '';
                    hasNext = false;
                if(nextUrl == ''){
                    hasNext = false;
                if(entityJSONList != null){
                    for(Object o : entityJSONList){
                        Map<String,Object> entityMap = (Map<String,Object>)o;
                        for(String s : entityMap.keySet()){
                            if(s == 'properties'){
                                Map<String,Object> propertiesMap = (Map<String,Object>)entityMap.get(s);
                                WrpperEntities we = new WrpperEntities(String.valueOf((Integer)propertiesMap.get('id')),(String)propertiesMap.get('entityName'),(String)propertiesMap.get('cscIndicator'), (String)propertiesMap.get('entityLegacyId'),(String)propertiesMap.get('cscStatus'));
        String jsonResult = json.serialize(groupentitieslist);
        system.debug('--------Complete Entity JSON Respose--------'+jsonResult);
        return jsonResult;

I am trying to create a query to group our Project Billing Item (custom object) by Project (another custom object).  Below is a copy of my initial query:



SELECT Name, (SELECT Project__c, Name, Employee__c, Description_of_Work__c, Hours_Worked__c, Date__c FROM Project_Billing_Item__c) FROM Project__c

Which generates the following error when executing: "Didn't understand relationship 'Project_Item__c' in FROM part of query call.  If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name."



I also tried changing it to the following:



SELECT Name, (SELECT Project__c, Name, Employee__c, Description_of_Work__c, Hours_Worked__c, Date__c FROM Project_Billing_Item__r) FROM Project__c



....and still receiving same error message stated above.  If it helps Project Billing Item (Project_Billing_Item__c) has a Master-Detail relationship to Project (Project__c).  Some additional information in case it helps:ks



Master-Detail Options
Related To: Project
Child Relationship Name: Project_Billing_Items
Related List Label: Project Billing Items

Master-Detail Options
Related To:   Project
Child Relationship Name:   Project_Billing_Items
Related List Label:    Project Billing Items




Thanks for the help and if I can provide any additional information that might help just let me know!

I want to pass one parameter when user clicks on a command button.


I tried the following


                   <apex:commandButton action="{!registerForEvent}" value="Register" title="Register">
                        <apex:param name="eventId" value="{!r.id}" assignTo="{!eventId}"/>


It does not work. The eventid value is coming as null in the controller. 


I was searching through the posts and found a few that says that this is a bug and parameters cannot be passed with command button. Some posts say, it works using assignTo attribute and having proper getter and setter methods for the assignTo variable. It is not working for me.


Is it working for anyone? Please let me know.


  • July 29, 2009
  • Like
  • 0
    Is it possible to use else logic in a formula field? I don't see it as an operator.

For example

IF (ISPICKVAL(Quantity, "500")) {69.90
} ELSE IF(....