Questions tagged [database]

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

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

What is the behavior of date/time fields regarding daylight saving time?

A user located in São Paulo/Brasil is on the UTC-3 timezone. As I write this post it is actually UTC-2 because of daylight saving time. That means that records created today will have the value of ...
0
votes
1answer
583 views

How to add 'LIMIT :' to String in Database.query?

I have Database.query that sorts records by a few filters (or any filter). I want to set the limit for it. How should a write it? return Database.query('SELECT Id, Name FROM Stereo_System__c' + ...
0
votes
1answer
238 views

Help with a schema, custom object to track product stock on Orders

How can I track product stock levels across locations? Our business process is basically this: When an oppy is closed won a trigger will automatically create a contract (not used by us - consider ...
0
votes
2answers
477 views

Test Coverage for Custom Error Logging

I created a custom object to store errors in my code. So I am updating some of my classes to take advantage of this object, but I am now running into issues with test coverage. I am taking advantage ...
0
votes
1answer
52 views

Need to retrieve values from database without refreshing the entire page

I have a Visualforce page with picklist and associated fields with it. When the picklist value is no I want the other input field values that we have provided to be saved in the database after ...
0
votes
1answer
305 views

How to format a number with comma?

Currently, I am using this query SELECT top 10 snt.Domain, count(*) AS DomainCount from _Sent snt group by snt.Domain order by count(*) desc The data type of "DomainCount" is number and the ...
0
votes
1answer
472 views

Database Class and DML in a transaction

According to the official document - https://developer.salesforce.com/docs/atlas.en-us.198.0.apexcode.meta/apexcode/apex_transaction.htm I understand that if there is any error in a transaction ...
0
votes
1answer
39 views

Is it possible to generate Leads from my database

I am using a form on my site to add new leads to a MySQL database. Is it possible to generate my leads in Salesforce from my existing database?
0
votes
1answer
117 views

Java - like Apex for SOBJECTS

Sorry, I don't know if this is a proper context to make this question, but I don't know where to make this question. I write here because I immagine that a lot for today apex programmers has been ...
0
votes
1answer
109 views

Inserted records have lifespan only within current Visualforce page

I have a VF page which dynamically inserts records into a custom object. To debug the problem and ensure the records have been successfully, I reloaded the inserted records after the insertion. The ...
0
votes
1answer
5k views

Database schema export

Hi we have a date export made from salesforce instance. We'd like to rebuild just the database but we stumbled on process to import the CSV files to a SQL Server database. We have force.com IDE ...
0
votes
1answer
865 views

What the best way to store data from Javascript in “salesforce”

I'm writing a small analytics app in Javascript and want to store data in a database. Since I am new to salesforce I can't figure out the best way to do this: a normal DB such as heroku (postgresql) ...
0
votes
1answer
21 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 ...
0
votes
2answers
15 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 ...
0
votes
0answers
32 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 ...
0
votes
0answers
16 views

Unable to get related data in apex when using dynamic SOQL [duplicate]

I have a requirement where I have to query certain fields dynamically based on a string that contains the fields. However, when trying to obtain the values, I get 'Invalid field' error. A simple ...
0
votes
0answers
59 views

Error saving data to an external object

When trying to save data in an external object the following error occurs: FATAL_ERROR|System.UnexpectedException: A callout was unsuccessful because of pending uncommitted work related to a process, ...
0
votes
1answer
168 views

How to use insertAsync with processSave

I am trying to understand how insertAsync(sobjects, callback) works with processSave(saveResult) I went through the following two documentations, but couldn't find an example anywhere https://...
0
votes
0answers
52 views

Duplicate record not added to Database DuplicateRecordSet

We have activated the standard duplicate rules and matching rules for Account. Generally, they seem to work and the duplicate records get written into the tables DuplicateRecordSet and ...
0
votes
0answers
140 views

Search and view data from external database

I have a business requirement to create a way for users to search and view results from an external database (Snowflake) in Salesforce. I have created a simple visualforce page and need to send a ...
0
votes
0answers
85 views

Exception: Invalid field X__c for SObject Y__c

I have below VF Page. <apex:pageBlock > <apex:pageBlockTable value="{!CPAT_accounts}" var="c"> <apex:repeat value="{!excelFields}" var="f"> <...
0
votes
1answer
204 views

How our database should be for using it with Salesforce Connect?

I have a on-premise data base(Oracle DB), this database i need to use in salesforce directly using External Object technology provided by salesforce. I understood how to use External objects in ...
0
votes
1answer
162 views

How can I find out what fields made my upsert fail?

I'm trying to upsert some records. I use Database.upsert. If the failure is related to a duplicate value (external ids that have to be unique) I need to know what fields are duplicate and clear (...
0
votes
1answer
550 views

What are the implications of trying to modify a rollup summary field?

I have tried manually modifying it and it seems possible, but I am not sure if there are any unintended side effects. My requirement is to have a logging summary table that rolls up the details of ...
0
votes
1answer
30 views

Which is the default field on which operates Database.Update?

I just couldn't find any topic regarding on which Field the Database.Update will operate? I suppose that it will do the update on id but I'm not sure. Am I right?
0
votes
0answers
87 views

why database.emptyRecycleBin() not removing the actual record from bin? [duplicate]

database.emptyRecycleBin([select id from test__c where IsDeleted = true ALL ROWS]); when i run the above and try to query the bin record, still record exist. What is wrong ? Please guide me !
0
votes
0answers
72 views

Problem with database.query() in APEX REST @httpput method

In APEX REST @httpput method, after DML is done on newKas, saved record having different value in Article_Title__c instead of fetched article title field value from database.query() method. @HttpPut ...
0
votes
1answer
37 views

Work order data need to be stored in SalesForce databse

I need to save custom data(Work order related data) into sales force database. I need to have a service for this the same will be called in my SOA application. What database API i have to use to store ...
-1
votes
2answers
2k views

How to define self relationship in salesforce

I am newbie to salesforce.Can some one explain how can i create self relationship in salesforce. I know salesforce doesn't provide out of the box this relationship. My Scenario is i have a Company ...
-2
votes
1answer
389 views

What is the execution time spent in the database for an DML or SOQL or SOSL?

Is it possible to find the execution time for a DML or SOQL or SOSL? What are the factors on which the execution time of these queries depend?

1 2 3
4