• Md. Abdur Razzak.
  • NEWBIE
  • 45 Points
  • Member since 2018
  • Software Engineer
  • Arollo Tech Limited

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 2
    Questions
  • 8
    Replies
Hi,
I am struggling with parsing JSON for object of array values with other fields.
The problem is unable to define variable set in wrapper class for "linked_objects": { "jobcodes": [ 27251018 ] } .

According to below code it gives error:
FATAL_ERROR System.JSONException: Expected List<CalloutTSheets.linked_objects> but found { at...


Use Case :
parse json with keeping two value pair by wrapper class and json filed linked_objects is object type which contains Array set of values. So  to parse the json string , along with other values need to extract jobcodes array in defined wrapper class WOTSheetsLocWrap .

Sample JSON
"results": {
        "locations": {
            "5214198": {
                "id": 5214198,
                "addr1": "33W401 Roosevelt"
             ..
                "linked_objects": {
                    "jobcodes": [
                        27251018
                    ]
                }
            }

Sample Apex Code:
public class WOTSheetsLocWrap{
        public String id;
        public String addr1;        
        List<linked_objects> linked_objects;
    }   
    public class linked_objects{
        String [] jobcodes = new List<String>();     
    }   
......
		Map<String, String> WOTSLocMap = new Map<String, String>();

        system.debug('resLoc');

        system.debug(resLoc.getBody());

        JSONParser parserLoc = JSON.createParser(resLoc.getBody());
        parserLoc.nextToken();
        parserLoc.nextToken();
        parserLoc.nextToken();
		parserLoc.nextToken();
		parserLoc.nextToken();
        while(parserLoc.nextToken()!=NULL){
            parserLoc.nextToken();
            if(parserLoc.getCurrentToken()==JSONToken.START_OBJECT){
				CalloutTSheets.WOTSheetsLocWrap obj = (CalloutTSheets.WOTSheetsLocWrap)parserLoc.readValueAs(CalloutTSheets.WOTSheetsLocWrap.class);
				if(!String.isBlank(obj.id)) WOTSLocMap.put(obj.addr1,obj.id);
                system.debug('obj');

            }
        }
    system.debug(WOTSLocMap);


Thanks in Advance...
I am trying to implement Twilio Flex for Salesforce Open CTI. I am using a twilio trial account. Twilio Inbound calls to salesforce using twilio flex is fine. But Click-To-Dial for salesforce outbound call using twilio flex is not working. When I click a phone number from the salesforce contact page, the twilio window pops up and shows a message 'Attempting Outbound call now' then stops and no call is placed in the specified number.

And I got this console error erery time
Refused to run the JavaScript URL because it violates the following Content Security Policy 
directive: "script-src 'self' 'nonce-fbd8b58ceca1755f12efd1a1e2bd2a8f' 
chrome-extension: 'unsafe-eval' *.canary.lwc.dev *.visualforce.com 
https://ssl.gstatic.com/accessibility/ https://static.lightning.force.com". 
Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce 
('nonce-...') is required to enable inline execution.

Error: outbound calling disabled
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at Object.next (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at new Promise (<anonymous>)
    at i (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at e.startOutboundCall (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at e.<anonymous> (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142)
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142
    at Object.next (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142)
(anonymous) @ assets.flex.twilio.com/twilio/flex-salesforce-integration/1.4.0/plugin-flex-salesforce-integration.js:1

 

I am trying to pass the Einstein Analytics Data Preparation Specialist challenge#3 but got the following error -

 

Challenge Not yet complete... here's what's wrong:
We can't find the 'Create Seed Bank Agencies' node or required fields are missing. Check the challenge and confirm the node name, alias, and required fields.

can anyone please help me to overcome the issue. here are my files


User-added image
User-added image
{
  "Filter Agency Records": {
    "action": "filter",
    "parameters": {
      "filter": "IsAgency:EQ:TRUE",
      "source": "ID Agency Records"
    }
  },
  "Load Account": {
    "action": "sfdcDigest",
    "parameters": {
      "fields": [
        {
          "name": "AccountNumber"
        },
        {
          "name": "Name"
        },
        {
          "name": "Phone"
        },
        {
          "name": "ShippingCity"
        },
        {
          "name": "ShippingCountry"
        },
        {
          "name": "ShippingPostalCode"
        },
        {
          "name": "ShippingState"
        },
        {
          "name": "ShippingStreet"
        }
      ],
      "object": "Account"
    }
  },
  "Create Seed Bank Agencies": {
    "action": "sfdcRegister",
    "parameters": {
      "name": "Seed Bank Agencies",
      "alias": "seed_bank_agencies",
      "source": "Filter Agency Records"
    }
  },
  "Add Agency Fields": {
    "action": "augment",
    "parameters": {
      "right_key": [
        "AccountNumber"
      ],
      "left": "Load Account",
      "left_key": [
        "AccountNumber"
      ],
      "right_select": [
        "Acres",
        "Currency",
        "Latitude",
        "Longitude",
        "Region",
        "SubRegion"
      ],
      "right": "Load Agency Detail",
      "relationship": "AgencyDetails",
      "operation": "LookupSingleValue"
    }
  },
  "Load Agency Detail": {
    "action": "edgemart",
    "parameters": {
      "alias": "Agency_Detail"
    }
  },
  "ID Agency Records": {
    "action": "computeExpression",
    "parameters": {
      "source": "Add Agency Fields",
      "mergeWithSource": true,
      "computedFields": [
        {
          "name": "IsAgency",
          "saqlExpression": "case when Phone is not null then \"TRUE\" else \"FALSE\" end",
          "label": "IsAgency",
          "type": "Text"
        }
      ]
    }
  }
}

Hi,
I am struggling with parsing JSON for object of array values with other fields.
The problem is unable to define variable set in wrapper class for "linked_objects": { "jobcodes": [ 27251018 ] } .

According to below code it gives error:
FATAL_ERROR System.JSONException: Expected List<CalloutTSheets.linked_objects> but found { at...


Use Case :
parse json with keeping two value pair by wrapper class and json filed linked_objects is object type which contains Array set of values. So  to parse the json string , along with other values need to extract jobcodes array in defined wrapper class WOTSheetsLocWrap .

Sample JSON
"results": {
        "locations": {
            "5214198": {
                "id": 5214198,
                "addr1": "33W401 Roosevelt"
             ..
                "linked_objects": {
                    "jobcodes": [
                        27251018
                    ]
                }
            }

Sample Apex Code:
public class WOTSheetsLocWrap{
        public String id;
        public String addr1;        
        List<linked_objects> linked_objects;
    }   
    public class linked_objects{
        String [] jobcodes = new List<String>();     
    }   
......
		Map<String, String> WOTSLocMap = new Map<String, String>();

        system.debug('resLoc');

        system.debug(resLoc.getBody());

        JSONParser parserLoc = JSON.createParser(resLoc.getBody());
        parserLoc.nextToken();
        parserLoc.nextToken();
        parserLoc.nextToken();
		parserLoc.nextToken();
		parserLoc.nextToken();
        while(parserLoc.nextToken()!=NULL){
            parserLoc.nextToken();
            if(parserLoc.getCurrentToken()==JSONToken.START_OBJECT){
				CalloutTSheets.WOTSheetsLocWrap obj = (CalloutTSheets.WOTSheetsLocWrap)parserLoc.readValueAs(CalloutTSheets.WOTSheetsLocWrap.class);
				if(!String.isBlank(obj.id)) WOTSLocMap.put(obj.addr1,obj.id);
                system.debug('obj');

            }
        }
    system.debug(WOTSLocMap);


Thanks in Advance...
I am trying to implement Twilio Flex for Salesforce Open CTI. I am using a twilio trial account. Twilio Inbound calls to salesforce using twilio flex is fine. But Click-To-Dial for salesforce outbound call using twilio flex is not working. When I click a phone number from the salesforce contact page, the twilio window pops up and shows a message 'Attempting Outbound call now' then stops and no call is placed in the specified number.

And I got this console error erery time
Refused to run the JavaScript URL because it violates the following Content Security Policy 
directive: "script-src 'self' 'nonce-fbd8b58ceca1755f12efd1a1e2bd2a8f' 
chrome-extension: 'unsafe-eval' *.canary.lwc.dev *.visualforce.com 
https://ssl.gstatic.com/accessibility/ https://static.lightning.force.com". 
Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce 
('nonce-...') is required to enable inline execution.

Error: outbound calling disabled
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at Object.next (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461
    at new Promise (<anonymous>)
    at i (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at e.startOutboundCall (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:1461)
    at e.<anonymous> (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142)
    at assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142
    at Object.next (assets.flex.twilio.com/releases/flex-ui/1.23.1/twilio-flex.min.js:142)
(anonymous) @ assets.flex.twilio.com/twilio/flex-salesforce-integration/1.4.0/plugin-flex-salesforce-integration.js:1

 

I am trying to pass the Einstein Analytics Data Preparation Specialist challenge#3 but got the following error -

 

Challenge Not yet complete... here's what's wrong:
We can't find the 'Create Seed Bank Agencies' node or required fields are missing. Check the challenge and confirm the node name, alias, and required fields.

can anyone please help me to overcome the issue. here are my files


User-added image
User-added image
{
  "Filter Agency Records": {
    "action": "filter",
    "parameters": {
      "filter": "IsAgency:EQ:TRUE",
      "source": "ID Agency Records"
    }
  },
  "Load Account": {
    "action": "sfdcDigest",
    "parameters": {
      "fields": [
        {
          "name": "AccountNumber"
        },
        {
          "name": "Name"
        },
        {
          "name": "Phone"
        },
        {
          "name": "ShippingCity"
        },
        {
          "name": "ShippingCountry"
        },
        {
          "name": "ShippingPostalCode"
        },
        {
          "name": "ShippingState"
        },
        {
          "name": "ShippingStreet"
        }
      ],
      "object": "Account"
    }
  },
  "Create Seed Bank Agencies": {
    "action": "sfdcRegister",
    "parameters": {
      "name": "Seed Bank Agencies",
      "alias": "seed_bank_agencies",
      "source": "Filter Agency Records"
    }
  },
  "Add Agency Fields": {
    "action": "augment",
    "parameters": {
      "right_key": [
        "AccountNumber"
      ],
      "left": "Load Account",
      "left_key": [
        "AccountNumber"
      ],
      "right_select": [
        "Acres",
        "Currency",
        "Latitude",
        "Longitude",
        "Region",
        "SubRegion"
      ],
      "right": "Load Agency Detail",
      "relationship": "AgencyDetails",
      "operation": "LookupSingleValue"
    }
  },
  "Load Agency Detail": {
    "action": "edgemart",
    "parameters": {
      "alias": "Agency_Detail"
    }
  },
  "ID Agency Records": {
    "action": "computeExpression",
    "parameters": {
      "source": "Add Agency Fields",
      "mergeWithSource": true,
      "computedFields": [
        {
          "name": "IsAgency",
          "saqlExpression": "case when Phone is not null then \"TRUE\" else \"FALSE\" end",
          "label": "IsAgency",
          "type": "Text"
        }
      ]
    }
  }
}

Hi Devs! 


I'm a new adventurer in Salesforce and I don't have so much knowledge in developing. So I'm learning about Einstein Analytics and it is my first Superbadge in Trailhead.
I did the previous requires perfectly, like upload files and organize my org, so my question is:
- The first challenge says to do a graph that shows a churn rate (like a image below), but I cannot undertand how to do this formula. I need to do this using SAQL? Can you help me showing how I proceed to do this graph?

Thanks for help! I'm beginner in Salesforce World and I need to get knowledge in this great software!
Formula
Hi Admins and Developers! What's up?


I'm learning Einstein Analytics and it is my first Superbadge, so I've some questions about it:
1) This first step we need to create a chart that show churn rate from quarter, I'm lost in 5º step, I really don't know how to do this requires to this chart. 

I'm grateful for help!

User-added image
 
After many attempts, I am still struggling to complete step 6 in the Lightning Experience Rollout Specialist Super badge. I receive the below error when trying to complete the activity but believe I have completed it correctly? I have added both topics and recommendations to the page, seen in below screenshot. I have also restarted this super badge in a new playground but still facing the same problem. 

User-added image

User-added image
I keep getting an error on Item #4 "The custom set of fields that are highlighted on account records must be assigned to the required profile."

The requirement is asking for having highlights based on profiles, but as we know compact layouts are applied to the whole system not by profile.

I am not sure how to fix this, any help is appreciated.