Skip to main content

Questions tagged [database]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

mapping changing defect types across different products

I need a way to unify "defect types" and "defect subtypes" (these are fields in a salesforce object) over multiple products with each new product release. I am a Q&R engineer (...
AnthonyJS's user avatar
0 votes
0 answers
35 views

how to override user's locale for number format in Apex data upsert operation

I've a Database.upsert operation on Apex base. But a user's locale(who runs the upsert operation) is Kyrgyz (Kyrgyzstan). Because of the number format that user has the numbers being upserted without ...
batuayyildiz's user avatar
1 vote
1 answer
47 views

Unable to lock row or deadlock issue

We have over 200 test methods in the org and since I started creating some test classes for my own Sandbox I have ran into issues with the following error but may vary by method: System.DmlException: ...
MrKnudz's user avatar
  • 13
0 votes
1 answer
37 views

How to get row number for jobid via SQL?

I am trying to extract jobids from data view bases on the emailname. How can I get the row number if I am getting back multiple jobids? I tried using ROW_NUMBER() but getting a static value of "1&...
kl2's user avatar
  • 353
-2 votes
1 answer
23 views

Database.update issue with AccessLevel (FLS check) and Master-Detail fields with reparenting disabled

I'm having an issue with using AccessLevel.User_mode: Database.update(someSObject, AccessLevel.User_mode); The problem is that if I have a Master-detail field on an object that is being updated and ...
LinQ's user avatar
  • 139
0 votes
0 answers
25 views

JDBC driver not loading in Dataloader 37

I'm trying to configure Database as source in a Data Loader 37 bean, but at time to execute it from CLI I got an error message that specify the JDBC driver cannot be loaded, according to the ...
saulrainier's user avatar
0 votes
0 answers
20 views

How can I restore a Heroku database detached?

I used to be a free plan Heroku user. Since Heroku removed free plan my project databases have been detached (December 2022). Heroku doesn't provide technical support for free applications. As of ...
user avatar
-1 votes
1 answer
65 views

How to create a sql query in SFMC with where clause with date and time

I am trying to create a query that pulls the record from _open data view before a specific date and time, how to do that in sql? I am currently doing this for defining the date: Select * from _open ...
kl2's user avatar
  • 353
-2 votes
1 answer
46 views

Please Recommend Some Free ETL Tools

Can anyone recommend me some ETL tools to integrate salesforce with Oracle ?
Nikhil Tripathi's user avatar
1 vote
1 answer
96 views

Below is my class I want recordId from the Database.error

for (Database.SaveResult result : saveResultList) { if (result.isSuccess()) { successCount++; system.debug('Get id of success Record'+result.getid()); } ...
Faizan Shaikh's user avatar
0 votes
1 answer
55 views

Any suggestions on better or optimized approach that returns single row from multiple rows based on ROW_NUMBER in SFMC

I have a customer data extension where customer records are saved with order numbers like this: CustomerOrderDE: CustomerID OrderID OrderTotal 1 101 $100 1 102 $200 2 103 $50 3 104 $75 3 105 $60 ...
kl2's user avatar
  • 353
0 votes
0 answers
76 views

Tip still showing Database access elements in loop

I have a loop in a flow where I have multiple Get elements which are clearly placed after the "After Last" path when the loop is complete. But the Flow 'Tips' is still telling me almost ...
Suzie's user avatar
  • 11
2 votes
0 answers
71 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
1 answer
184 views

Database delete isSuccess is true but record not deleted [closed]

I've been trying to remove related record called it A before inserting record B on trigger. In the handler i was querying record A by value populated in record B field. When i called result and debug ...
B.G's user avatar
  • 23
0 votes
1 answer
78 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
  • 353
0 votes
1 answer
236 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
  • 353
0 votes
1 answer
381 views

Possible to remove or ignore errors from trigger-context SObject after .addError() in Apex?

With Apex, after calling .addError() on a trigger record is there any way to subsequently remove that error such that the DML operation will complete successfully? I don't see any Database methods (...
Brent Bowers's user avatar
  • 3,144
0 votes
1 answer
304 views

Parentheses on Dynamic SOQL Unexpected Token '('

I still dont get to know why this dynamic query executed through Database.query() is throwing Unexpected Token Error on the parenthesis char. My code so far is this: @AuraEnabled public static ...
Samuel L's user avatar
0 votes
1 answer
242 views

How to apply inclusion and exclusion criteria when data extensions are linked by one to many relationships?

I have a contacts DE table like this: Contacts CustomerID CustomerName Country 1 Alfreds Futterkiste Germany 2 Ana Trujillo Emparedados y helados Mexico 3 Antonio Moreno Taquería Mexico 4 Around ...
kl2's user avatar
  • 353
0 votes
1 answer
147 views

Create a global number sequence for Lead and Account

I want to create a global numeric sequence that works for both the Lead and Account object, because we will integrate Salesforce with an ERP that works with leads and accounts in the same object, ...
Delpan's user avatar
  • 26
2 votes
0 answers
257 views

Where is Database.query() spending (so much) CPU time?

My assumption was that only Apex Code is using CPU time. But the what I measure for code that is run by Salesforce's own Backend code speak a different language. List<SObject> result = Database....
Robert Sösemann's user avatar
0 votes
0 answers
191 views

Implementing autocomplete suggestion for record ids

The LWC app that I am currently working on has a feature that lets users fetch information for a record whose record ID is entered. I am looking forward to implementing a feature that proactively ...
darthcoderUS's user avatar
-1 votes
1 answer
99 views

Trigger action values not updating in Database

I am new to salesforce and trying to play around with triggers. I have tried the trailhead exercise for triggers to set shippingPostCode from BillingPostalCode. Below is my code trigger ...
Ranjith's user avatar
-1 votes
1 answer
89 views

SOQL: How to get the biggest value from a field and compare to a another on query?

I need to get the biggest value from field createddate and then compare this value to another date on a query/soql. I think about using "order by createddate desc limit 1" but I don't know ...
user avatar
0 votes
0 answers
530 views

how to find out total number of subscribers who were sent 1 email in last from in salesforce marketing cloud

I am trying to get a count of all subscribers (irrespective of BU) - hence I am running the query in parent BU who received ONLY 1 email in previous month. This is my query but it is not returning any ...
kl2's user avatar
  • 353
0 votes
1 answer
2k views

Get record field after Error in Database.Upsert

I'm upserting some records using Database.upsert, after that, I'm supposed to get the errors and pass them to a custom logger. The problem is, the way this class works, I'd need to get a field value ...
Julia de Lucca Ribeiro's user avatar
0 votes
2 answers
761 views

Database class partial success can exceed governor limits?

I have a question about the partial success using database class. My question is, if i exceed governor limits. Will the whole transaction be rolleback or i'll have in the database the records that ...
Julian Gutierrez Caligaris's user avatar
4 votes
0 answers
527 views

how data in _open data view is recorded in SFMC

As of now, our understanding of data views is that data is mostly real-time. But is this true for all data views or only specific data views? if specific, then which ones? Recently, we noticed that we ...
kl2's user avatar
  • 353
1 vote
1 answer
1k views

Difference between Upsert and Update database methods

Good morning. Database.update (fields , allOrNothing) Database.upsert (fields, externalId, allOrNothing) I need help to understand why the second parameter "externalId" is not necessary on ...
LatDu's user avatar
  • 59
0 votes
2 answers
129 views

What is the highest performance way to work with results in a List<SOBject> returned from Database.query()?

I have a custom object called Query_Definition__c that has two fields: SObject_Name__c (text) SOQL_Query__c (long text) Within Apex, the requirement is to take the record details from the ...
Tom Kline's user avatar
  • 167
0 votes
1 answer
1k views

Query based on variable field name

I would like to know that how can we search based on a custom field via a variable. For example, if I create a custom field Mobilephone for the standard object Account, then how can I search this ...
Badar's user avatar
  • 45
1 vote
0 answers
260 views

Roll up summary field max value in database

I want to export Roll up summary fields to external system. What should be database column length. Should i use int, bigint or any other data type. I was just doing testing in my org and roll up ...
Manjot Singh's user avatar
  • 3,516
1 vote
1 answer
882 views

Django Heroku: remaining connection slots are reserved for non-replication superuser connections

I recently deployed an app to Heroku using Postgres free tier as database. I am using Django 3.2 Everything was working fine until I started getting a mail with the following error: Internal Server ...
David.B's user avatar
  • 111
0 votes
1 answer
318 views

Database.executebatch call in for loop causing Codescan warnings

I have a piece of code that is causing some codescan warnings and it is not liking the database.executebatch in the for loop. The thing is I am not sure to go around it My code: public with sharing ...
Strong Like Bull's user avatar
-2 votes
1 answer
125 views

How can I consume a SQL database to create / update records in salesforce using apex? [closed]

I would like to consult you for something, do you know if it is possible that a sql database can be consumed from salesforce? What happens is that account records are loaded into the SQL database and ...
Jesús Merino's user avatar
0 votes
1 answer
28 views

Is there a database method other than oData?

I wonder if there is a database and method other than oData. I wonder if there is a way to connect in real time like oData rather than importing a csv file.
Jack Den Per's user avatar
2 votes
1 answer
2k views

How to compare the Database.Error getStatusCode() value against a string (In a clean way)

I have the following code which uses string concatenation to check the err.getStatusCode() if (err.getStatusCode()+'' != 'ENTITY_IS_DELETED'). My question is, if there's a cleaner/better way to do ...
Bahman.A's user avatar
  • 858
0 votes
1 answer
1k views

" Error: Could not establish connection. Receiving end does not exist." when trying to create object record

I am trying to insert record in Salesforce after a button click but I receive this error when clicking on the button. Below are provided my JS and apex class for the handling of this operation. No ...
adidascoder's user avatar
0 votes
2 answers
873 views

Using Apex class in salesforce community site

I'm working on a very simple project that uses google books API and I have a problem. I want to save all search history in an object in database and all works fine when I'm logged in my account and ...
senoron's user avatar
  • 192
0 votes
0 answers
81 views

Get Campaign name from _Sent dataview [duplicate]

I downloaded the _Sent dataview to my server. Now I need to join the _Sent data with the campaign names to filter. How can I get from the _Sent dataview to the campaign name?
Frank Herbert's user avatar
0 votes
1 answer
41 views

StandardSetController Pagination problem when use WHERE

I try to make pagination for my table. When selectList change i take Id and want it in my Database Query, but if i add Where to soql the table isn`t displayed. My variable carId is null into if(setCon ...
Artsiom's user avatar
0 votes
2 answers
602 views

Unable to Merge two account and giving the "Database.MergeResult = Invalid field IsCustomerPortal for merge;MERGE_FAILED;"

private static void DuplicateAccountMerge(List<Account> triggerNew) { try{ // Merges a new Account with an existing Account based on matching email addresses. // Old ...
user41705's user avatar
4 votes
3 answers
3k views

how to make sure update contact step in journey builder honors primary key?

I am trying to create one Data Extension that can be used to log all contacts going into multiple journeys and then use update contact event within journey to update row when a contact exist journey. ...
kl2's user avatar
  • 353
0 votes
1 answer
395 views

Access Contact fields from Opportunity object

I'm showing up with another problem: I'm building a VF PDF page based on Opportunity object and I want to add a paragraph that shows all contacts related to this Opportunity. My approach was as ...
Dennis1995's user avatar
1 vote
0 answers
333 views

Database.merge - error "Invalid field IsCustomerPortal for merge"

I'm trying to merge accounts in apex using database.merge - Getting error "Invalid field IsCustomerPortal for merge". This field is available in Account object. The org do not have customer ...
Anand Jeevakan's user avatar
0 votes
0 answers
41 views

Api Integration Issue

I have created an api integration in salesforce. From client's website a request will send to Salesforce in form of JSON. This will create record in Salesforce. Sometimes multiple requests are sent ...
Sushil's user avatar
  • 3
3 votes
2 answers
921 views

How to rollback DML after catching exception in unit test

I have a custom business logic that will block certain profiles from editing/creating/deleting an account. Because of other requirements, mainly around Record Types, I can't use profiles and ...
Has Nah's user avatar
  • 175
1 vote
0 answers
44 views

Heroku & Salesforce - Database question for multiple environments [closed]

Along with our production org, we have 3 full sync sandboxes, Mule APIs and Heroku. We are in the process of setting up an app, which is really just going to hold a postgreSQL database that is written ...
SBB's user avatar
  • 173
0 votes
1 answer
326 views

Setting up MC with dedicated db

We have a new MC account we would like to start setting up. We have purchased a dedicated db sku for this account. Are there any implactions or things we should know while setting up this new MC ...
Barak's user avatar
  • 133
2 votes
1 answer
230 views

What would be an ideal use case where you would use sObject.addError() over savepoints and rollbacks?

I came across two methods of preventing errors while inserting, updating or deleting the records in salesforce. Let's say I am performing any one DML operation, and I want the transaction to stop if ...
Ayush Goyal's user avatar

1
2 3 4 5