Questions tagged [query]

A query is an inquiry into the database using the SELECT statement. A query is used to extract data from the database in a readable format according to the user's request.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

I am trying to create a flow in Salesforce org that will update a custom lookup field(user) to blank when the user has been deactivated

I have created a record triggered flow: object user. I need to update the SDR2 custom field to blank, which is the lookup field to user, when the user has been deactivated. The condition I have ...
Denisa Seranllari's user avatar
3 votes
1 answer
127 views

SOSL Find query not returning Standard Profiles, only Custom

Hello! I have a lookup component that uses a dynamic query based around FIND. It works great except when querying Standard Profiles. If I search for profiles, only custom profiles are returned. ...
Tom Adam's user avatar
-2 votes
0 answers
49 views

How to seperate queueIds from Map? [duplicate]

Map<Id,QueueSobject> groupDetailQueueIds = new Map<Id,QueueSobject>(); Map<Id,QueueSobject> groupDetail = new Map<id,QueueSobject>([Select Id, SobjectType, QueueId, Queue.Name ...
Basha's user avatar
  • 5
2 votes
1 answer
108 views

Removing 1 billion rows of a DE

As the title suggests, I need to figure out how I can remove ~1 billion rows of a Send Log data extension. I can't even change the data retention policy until the count is < 100 million. I thought ...
PForsyth's user avatar
-1 votes
1 answer
48 views

Automation for birthday adding contacts the day after instead the exact day

we're experiencing some issues with a birthday automation query. Our query runs everyday and should filter contacts from 2 DE (contacts that are celebrating their birthday on that day) and put it in a ...
lisim's user avatar
  • 1
0 votes
2 answers
69 views

Nested query works in salesforce inspector but not in request with query in url

I'am trying to get(request) Accounts with some informations from child called Services__c. When im performing query in inspector it works fine SELECT Legal_Name__c, Name, BillingCountry, (SELECT ...
B.G's user avatar
  • 13
2 votes
1 answer
86 views

How to delete emojis using SQL in Marketing Cloud

I have a Data Extension named "Jobs", where I keep records from dataview Job. My team started to use emojis in subject lines of the e-mails, so also in my table "Jobs", I have ...
Maciej Barnaś's user avatar
-1 votes
1 answer
48 views

How to check JobStatus for scheduled sends with Salesforce Data Extensions

When scheduling the email with normal data extension, we will be able to see the status of email whether it's paused or scheduled. However, we can't see/check the status of email scheduled with ...
TP0505's user avatar
  • 1
0 votes
0 answers
64 views

Salesforce Error ID: 2046021028-569681 (-1183289157)

When create a get record on Salesforce Flow with multiple case field i have this error : --> Error Occurred: This error occurred when the flow tried to look up records: An unexpected error occurred....
Jul0s's user avatar
  • 11
0 votes
2 answers
64 views

Combine two SQL queries in Salesforce Marketing Cloud

On the SMC platform, we employ two SQL queries to fetch data pertaining to a specific column. We pull data from two tables in the Data Extension. However, when attempting to merge these two queries ...
Larisa Rusinovich's user avatar
0 votes
2 answers
81 views

How to retrieve User.IsPortalEnabled info from CreatedBy field on a object like Feed Item using Apex and SOQL in Salesforce [closed]

I have used this query using TYPEOF operator in SOQL which returns me records in Workbench, but not sure how to retrieve values in actual apex code as it keeps on giving error. This is the query: ...
Sfdc's user avatar
  • 29
0 votes
1 answer
54 views

Query Returning Duplicates

Goal: Query all emails sent for particular emails with the contact information and bounce information for each. Issue: Query results contain duplicate records. Question: How can I modify the query so ...
MarquezMoore's user avatar
1 vote
1 answer
81 views

Find all instances where someone is running user

I am trying to help someone remove all instances where a specific person has left the company is the running user in Salesforce. I would not consider myself a developer by any means, however this ...
Raquel R's user avatar
0 votes
0 answers
32 views

I want to solve the Too many SOQL queries. How can I reduce the number of queries?

Multiple queries are being executed depending on the data type as follows. I want to reduce the number of queries as much as possible. What should I do? //Get contract event for(ContractInfo__c ...
aeonyet's user avatar
  • 11
7 votes
1 answer
606 views

Possible bug in SOQL LIMIT clause

I've just encountered a weird behaviour of SOQL and I wonder if it's a bug or maybe some feature I do not understand: looks like the compiler lets you add an incorrect LIMIT clause - LIMIT1 for ...
Bartosz Śliwiński's user avatar
0 votes
1 answer
55 views

Combining 3 SQL Queries into a Single Query

I'm facing a challenge with my SQL query in Marketing Cloud and would appreciate the community's help in resolving it. Recently, I created three separate Data Extensions as part of a segmentation. To ...
Mik's user avatar
  • 3
2 votes
2 answers
182 views

SOQL for ApexTrigger filtered on Name field returns no results

querying all my trigger name filtering by specific name. But no result found ? what is that I am missing ? Note: Same query works perfectly in production
Ragul's user avatar
  • 1
-1 votes
1 answer
63 views

case : check if field A exist in field B

i have a data extension with the first 3 fields : Id, Email_source1 and Email_source2. i want to create the field named X. The goal is to check if Email_source1 is in Email_source2. Does someone know ...
ayakuza91's user avatar
-1 votes
1 answer
93 views

Can I convert string to datetime in Marketing cloud's SQL?

I have string data like '20230823143306'. Is there any way to convert it to a datetime format, like '08/23/2023 02:33:06 PM', using SQL? I've heard that it might be possible to perform this conversion ...
Minkyeong Kwon's user avatar
0 votes
0 answers
40 views

Query works in Query studio but not in automation studio to add to a data extension

The following query worked in query studio but when I tried to use it in the automation to update a Data extension, I got the error "Violation of PRIMARY KEY constraint. Cannot insert duplicate ...
Salsstars's user avatar
2 votes
0 answers
64 views

"Didn't understand relationship 'Histories' in FROM part of query call." When query Seller History from Seller

I am getting an script-thrown exception when query Seller History from Seller. Here is my apex class: public without sharing class MainLayoutController { public static SObject ...
Tuấn Trần quốc's user avatar
0 votes
0 answers
75 views

Query Error: Automation failed due to system error

I am seeing this error when trying to run a query in Query Studio attempting to return other products an author has written for a given user with a recent order: "Automation failed due to system ...
Collin O'Rear's user avatar
0 votes
0 answers
35 views

How to get the records with the combination of Year and Created Date in the SOQL? [duplicate]

I am working on one requirement to display records on the LWC data table by fetching them using the combination of Year (picklist field) and Created Date. Suppose if table has below records: 1. Year =...
Praveen's user avatar
  • 15
0 votes
1 answer
258 views

Is it possible to view which permission set or profile grants access to an object?

For example, I would like to know which permission set grants at least read access to an object.
Renato Oliveira's user avatar
-3 votes
1 answer
46 views

How to Minimize Query

current query- global Database.QueryLocator start(Database.BatchableContext param1) { return Database.getQueryLocator( 'SELECT Id, RelatedRecord.timezonesidKey, ResourceType FROM ...
Shivani Shah's user avatar
1 vote
2 answers
231 views

How do we update subscribers email address in all subscribers list when contact change their email?

Contact located in Salesforce Service is added with "[email protected]" mail. Salesforce Service is connected to Marketing Cloud. Note: Subscriber Key is Salesforce Contact ID. Subscriber related ...
cameron harwood's user avatar
-4 votes
1 answer
74 views

Avoid untrusted variables in DML query [closed]

public static void isOdesevaUser(){ String query = 'Select Banker_Role__c from User where id = '+'\''+UserInfo.getUserId()+'\''; List<User> uList = Database.query (query); if(uList !...
Shivani Shah's user avatar
0 votes
1 answer
43 views

Field must be grouped or aggregated: Name?

I'm working on a query for an invoice template. We want for the "main" products to be displayed on the same list and the one time fees products to be displayed on an other list. We have ...
Audrey's user avatar
  • 1
0 votes
0 answers
195 views

Error when querying Salesforce REST API - order object with full query, but works fine with limited results and querying just one field

I'm encountering an issue when performing a REST API query for order object on Salesforce, specifically when using a full query that includes multiple fields. However, the query works perfectly fine ...
Athithya Vidyarth S's user avatar
0 votes
0 answers
30 views

Query attendees outside your organisation

I am trying to somehow programmatically fetch the attendees of an Event that was synced via Einstein Activity Capture. The attendees we are interested in are the ones that have not been synced to ...
Damian's user avatar
  • 1
0 votes
1 answer
26 views

Case Sensitive LIKE query fails for same letter with different cases

I have a custom string field, that is explicitly marked as Case Sensitive. When I query for this field, like so: SELECT field__c FROM Object__c WHERE field__c LIKE 'a%' OR field__c LIKE 'A%' I ...
luksfarris's user avatar
0 votes
1 answer
50 views

Issue querying custom object with external ID in webhook-triggered Apex class

I'm new to Salesforce and Apex, and I'm encountering an issue with my webhook setup. I've created a site using an Apex class to receive webhooks, and it's working well. The problem arises when I try ...
Christian Langer's user avatar
0 votes
1 answer
68 views

How to get records from sendable audience who did not make it to _SENT log without hardcoding the jobid

I have a DE extension where I have saved 1 record by querying: DE NAME: DataView_Job_DE Select top 1 JobID ,EmailName ,CreatedDate ,JobType ,JobStatus ,Row_Number() OVER (Partition by jobid ORDER BY ...
kl2's user avatar
  • 317
0 votes
1 answer
128 views

How to selecting value from another data extension in select statement in SFMC

I have a DE extension where I have saved 1 record by querying: Select top 1 JobID, EmailName, CreatedDate, JobType, JobStatus from _job Output is saved in data extension: DataView_Job_DE Now, I am ...
kl2's user avatar
  • 317
0 votes
1 answer
63 views

SQL Query Not Working

I'm trying to have this query pull all subscribers into a data extension who are not within another data extension. I'm not sure why it's not working. Select Status, Name, FirstName, LastName, ...
Beck's user avatar
  • 3
0 votes
1 answer
183 views

How to extract List of all journey only last version with sql

My goal is to create a Data Extension with SQL that will contain a report of all Journeys existing in production BU (except for those deleted), but I need the latest version. I managed to extract all ...
MEN's user avatar
  • 1
0 votes
1 answer
94 views

query received same email multiple times

I have a data issue where we have duplicate emails under different Subscriberkey. I'm trying to build a query now to check how many of this duplicate emails have received the same email multiple times....
Duicug's user avatar
  • 457
0 votes
0 answers
97 views

How to query child lookup objects correctly in Conga Composer?

I have a query added to a solution. The query fetches data from child a child record, but when I try to get name of fields in Template Builder, the fields that I select are provided in a format within ...
Oussama Boumhaout's user avatar
-3 votes
1 answer
126 views

SFMC Overwrite target data extension

I want to use query studio activity to write a query between two tables using a join. So lets say there is table1 and table2. I want to delete the data in table2 based on all the data in table1. So if ...
veyion's user avatar
  • 1
0 votes
1 answer
46 views

RE: Query Help to pull from main DE

i created a query to select from the master audience DE that do not exist in the CRM file. However, when i go to check the DE only subscription status pulls in... do i have something incorrect? Select ...
Jen's user avatar
  • 3
0 votes
1 answer
61 views

Specific Domain SQL Query result incorrect

I am trying to pull list of emails for a particular domain (which is aproblematic domain) and somehow my results does not make a sense--meaning that I'm getting way less than expected. To further ...
Araarso's user avatar
  • 23
0 votes
0 answers
17 views

Can I run a query activity from a cloudpage? [duplicate]

is it possible to run a query activity from a cloudpage? And how can I achieve this?
Martijn e's user avatar
  • 145
0 votes
1 answer
205 views

Having a double question mark query for one email url

I've added a question mark in url on marketing cloud because I want a specific code added in every email of the journey. When I send my email the usual query added after the launch give me two ...
myunkownpseudo's user avatar
0 votes
1 answer
54 views

Clone data from one field to another in a data extension in marketing cloud

I have a Data Extension in Marketing Cloud and I am using Automation Studio to create a querie that copy the data from one field to another. I want to pass all the event_id data to the new field ...
tayumy's user avatar
  • 1
0 votes
0 answers
92 views

Problem with automation and Sql Query

I have a problem with an automation: the query inside has no error and runs correctly, but no record is extracted. If I try to run it externally (via run once and query studio) the records are ...
Giulia Orru IT's user avatar
0 votes
1 answer
48 views

Automation to create separate data extensions of bounced contacts for each of our Business Units (Marketing Cloud)

I want to run a _Bounce data view in our Enterprise BU (Marketing Cloud), and then filter the data by Business Unit for each of our 120 Business Units. Is there a way to automate it to create one ...
DigitalColl's user avatar
-2 votes
1 answer
797 views

Steps to query data directly from Apex, and return the values to my LWC?

My goal is to get the metadata for all my Opportunities in Salesforce (the address, city, and state). I was told to look into query data directly from Apex, then I can return those values to my LWC. I'...
Pinto's user avatar
  • 128
0 votes
1 answer
472 views

LAST_N_DAYS is not working as expected in SOQL query

I am running an SOQL query to get 10th, 30th and 60th days before created records to notify users to take action. I wrote a query using LAST_N_DAYS:10 OR LAST_N_DAYS:30 in WHERE condition, but the ...
AshSFcloud's user avatar
0 votes
1 answer
83 views

Get NPSP Address object fields in a SOQL query

I wrote the below query and it keeps returning this error: "FROM npsp__Address__c) ^ ERROR at Row:11:Column:6 Didn't understand relationship 'npsp__Address__c' in FROM part of query call. If you ...
Marina 's user avatar
0 votes
1 answer
74 views

Sub query result using golang from salesforce

I am using a library similar to simpleforce: https://github.com/simpleforce/simpleforce to retrieve query result from Salesforce in golang. The retrieved result will be in SObject type which basically ...
Lance Shi's user avatar
  • 13k

1
2 3 4 5
34