soql

The requested resource does not exist [error] in Salesforce. What is wrong with Salesforce?

大城市里の小女人 提交于 2021-02-19 00:22:46
问题 I execute a SOQL request to get all available record ids of the SObject 'ObjectPermissions'. Then I use the request to GET /services/data/v48.0/sobjects/ObjectPermissions/{id} to fetch all the necessary info for a specific record. As you can see in the first picture, I received a response with a total of 960 records. The problem is that for 285 entries I can’t get the information. Here is an example of the answer I received for one of 285: I highlighted the identifier of this record. Maybe

Saleforce retrieving fields from two different objects - (SOQL) Simple Salesforce Python

泪湿孤枕 提交于 2021-01-29 06:51:00
问题 I am using simpleSalesforce library for python to query SalesForce. I am looking at two different object in SalesForce: Account and Backend (parent-child). The Id in account matches the records of Backend through acc_id I am trying to do this: sf.query_all("SELECT AccEmail__c, (select custid from Backend__c) from Account where Id in (select acc_id from Backend__c where custid LIKE '%CUST%')") But I get the response showing: Malformed request - didn't understand the relationship - in FROM part

soql select individual CaseComment with all its FeedComments

假如想象 提交于 2021-01-28 17:49:47
问题 I am trying to select all comments ,feeds and feedcomments for an individual case. The hierarchy is like Case | CaseComment | FeedComments(commnets or feeds under a CaseComment) I could not find any relation between CaseComments and FeedComments nor CaseComments and CaseFeeds . How can I select all together in a soql or individual soqls which relates Case, CaseComment,CaseFeed,FeedComment ? 回答1: EDIT The query you've included in the comment looks good. I'd write it as something like that:

Merge Data from different Queries without duplicates

回眸只為那壹抹淺笑 提交于 2021-01-27 14:11:47
问题 I am getting data from three different queries via Api. I want data to be merged without the duplicate data. This is my function where i am merging the data: getStaffCount(data) { if (data == null || data.results === null ) return []; else return data.results.StaffCount.map(m => ({ Name: m.Name, Accounts: m.Accounts })). concat(data.results.RepProviderAccount.map(m => ({ Name: m.Name, Accnt: m.Accnt }))). concat( data.results.ProviderAccount.map(m => ({ Name: m.Name, Account: m.Account })));

parent-child relationship query in simple_salesforce python, extracting from ordered dicts

老子叫甜甜 提交于 2021-01-18 06:10:55
问题 I'm trying to query information from salesforce using the simple_salesforce package in python. The problem is that it's nesting fields that are a part of a parent-child relationship into an ordered dict within an ordered dict I want.. from the Opportunity object, to find the id, and the accountid associated with that record. The SOQL query may look like.. query = "select id, account.id from opportunity where closedate = last_n_days:5" in SOQL (salesforce object query language), a dot denotes

parent-child relationship query in simple_salesforce python, extracting from ordered dicts

柔情痞子 提交于 2021-01-18 06:04:06
问题 I'm trying to query information from salesforce using the simple_salesforce package in python. The problem is that it's nesting fields that are a part of a parent-child relationship into an ordered dict within an ordered dict I want.. from the Opportunity object, to find the id, and the accountid associated with that record. The SOQL query may look like.. query = "select id, account.id from opportunity where closedate = last_n_days:5" in SOQL (salesforce object query language), a dot denotes

Querying Salesforce Object Column Names w/SOQL

拈花ヽ惹草 提交于 2020-03-12 04:41:55
问题 I am using the Salesforce SOQL snap in a SnapLogic integration between our Salesforce instance and an S3 bucket. I am trying to use a SOQL query in the Salesforce SOQL snap field "SOQL query*" to return the column names of an object. For example, I want to run a SOQL query to return the column names of the "Account" object. I am doing this because SOQL does not allow "Select *". I have seen code solutions in Apex for this, but I am looking for a way to do it using only a SOQL query. 回答1: You

Querying Salesforce Object Column Names w/SOQL

久未见 提交于 2020-03-12 04:40:08
问题 I am using the Salesforce SOQL snap in a SnapLogic integration between our Salesforce instance and an S3 bucket. I am trying to use a SOQL query in the Salesforce SOQL snap field "SOQL query*" to return the column names of an object. For example, I want to run a SOQL query to return the column names of the "Account" object. I am doing this because SOQL does not allow "Select *". I have seen code solutions in Apex for this, but I am looking for a way to do it using only a SOQL query. 回答1: You

Salesforce Apex - Populating an object from SOQL query

点点圈 提交于 2020-01-03 03:46:07
问题 I have a simple SOQL query that returns information relating to a Contact and CampaignMember. I'm attempting to populate a custom object with the results of the SOQL query. However I get the following error when loading the Visualforce page: Invalid field campaign.name for CampaignMember List campaignMembers = [select campaign.name, contact.id,contact.firstname, contact.lastname, status, campaignId from CampaignMember where contactId = '003U000000U0eNq' and campaignId in :campaigns]; for

Salesforce - Apex - query accounts based on Activity History

不羁的心 提交于 2019-12-24 04:18:15
问题 Hey Salesforce experts, I have a question on query account information efficiently. I would like to query accounts based on the updates in an activityHistory object. The problem I'm getting is that all the accounts are being retrieved no matter if there's "complete" activeHistory or not. So, Is there a way I can write this query to retrieve only accounts with activeHistory that has status="complete" and Type_for_reporting='QRC'? List<Account> AccountsWithActivityHistories = [ SELECT Id ,Name