Questions tagged [database]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
3k views

Pass a String in Select query - SOQL

I have a String that contains some custom fields of Account. I want to pass a String in a Select query like this : String myString = 'myCustomField1__c, myCustomField2__c'; List<Account> ...
1
vote
0answers
420 views

Guidelines for Salesforce Database (Objects) design

What are the best practices for Salesforce Database structure (Object structures)? . It is very difficult to query data from a highly normalized structure. As in we cannot follow the RDBMS (Oralce Db, ...
1
vote
2answers
2k views

Get ID with upsert

I'm trying to insert/update a custom object in database with upsert but after the upsert I need to get the database ID. Is there a way to get the new/updated ID on database without querying the ...
3
votes
3answers
2k views

Can I rollback a Before Insert trigger from an after trigger event?

Scenario: After an object is inserted/updated (can happen after any of the two) - I update an external system with that object's info - Object ID is needed - which is why I need the After Insert. ...
2
votes
0answers
228 views

sObject insert execution not synchronous

I have a custom object and a controller action that creates a new record of this type. The action then returns a page where the list of objects are displayed. save() { ... insert myObject; ...
1
vote
1answer
1k views

Database.delete and CRUD permissions

I have an detail Custom Object that has Contact as its master. My user profile has Read, but not Edit, Delete or Create permission. When I login as this user I can View the record, but the Edit and ...
4
votes
0answers
2k views

Is there a simple way to generate a create table script from a salesforce class?

I am looking for a way to synchronize Salesforce data with a local database. At the moment I just want a pain free way of downloading the data. I've been playing around with importing CSVs from the ...
1
vote
1answer
2k views

How to recognize duplicate records and other criteria within a Data Extension

Currently the AMPscript based landing page features an indication that shows how many individuals are signed up for an event. This number is arrived at simply by ROWCOUNT to see how many fields in the ...
6
votes
6answers
1k views

Most efficient (instant / no Batch) way to mark thousands of records as dirty

I have the requirement to store and retrieve the information that a set of arbitrary sobject records are "dirty" and need to be touch by asynch processes. I am talking about 10.000 to 100.000 records ...
2
votes
0answers
376 views

Newbie : Save User Credentials in Salesforce [closed]

I am making an App which has to run in Salesforce and eventually distributed over Appexchange. In my app, I would like the Salesforce user to enter his Username and Password (with which he registered ...
1
vote
1answer
618 views

Using Database.DeleteResult in custom code

How can I use Database.DeleteResult for custom functionality. I'd like to be able to construct it, set and get its fields.
7
votes
2answers
7k views

where do I use Database. Methods?

I m trying to understand where we use following Database.Methods. I know if we want to insert a record to an object we use DML Statement. What i want to know is why/where we use Database. methods. It ...
10
votes
2answers
380 views

How can updated SObjects/CObject be queried/retrieved without duplicate or missing records?

Another way to ask the question: Are SOQL queries transactional/atomic on the second level? I am writing a data integration with salesforce using the REST API. I want to retrieve a list of updated ...
1
vote
0answers
174 views

Temporary Restore of Salesforce

I always get asked the question by my clients - "What happens if we can't access Salesforce?". "Take regular backups" we say. But is that enough? Has anyone attempted to restore their Salesforce ...
2
votes
2answers
4k views

Salesforce API for saving data in Salesforce database using any other language (Cakephp)

Friends, I am a web developer(Cakephp). I am working on the XYZ project. In that project I have many Contact forms example - contact us form, user details form, enrollment form etc. I developed that ...
10
votes
1answer
2k views

Why does the documentation stipulate that a many-to-many object relationship requires two master-detail relationships?

In theory you can model a many-to-many relationship using lookup fields exclusively or in combination with a master-detail field. However the documentation only mentions master-detail fields. What ...
4
votes
2answers
219 views

Values of formula fields using NOW() and TODAY() actually stored in the database?

Just for the sake of argument, if I had the following formula field: MyObject__c.FormulaField__c = DAY(TODAY()) What is the actual value of this field stored in the database, will the value ...
2
votes
0answers
146 views

Obtaining users data after accepting / allowing a Chatter Application

I'm slowly on the road to completing my PHP application, the final piece to my knowledge is figuring out how, after a user accepts the use of an Application (I think I'm using a remote app atm), to ...
3
votes
1answer
788 views

Which free/commercial Salesforce To SQL app should I use? [closed]

I am looking for an easy to use app to synchronize (one-way) Salesforce data to a SQL database. I don't need mapping functionality that products like Jitterbit, Boomi and Informatica offer for a lot ...
0
votes
1answer
862 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) ...
-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 ...
4
votes
3answers
311 views

When should I start worring about the number of Records on a single object in a SF Org?

Just completing a project that has been deployed into a global SF Org. We have one object in particular that is likely to require a large number of records and is a related list on most pages. At ...
2
votes
2answers
812 views

Using the Entity–attribute–value model for sparse data

I'm looking at a design specification of a work request object that would if implemented purely as a standard salesforce object would cause very sparse columns requiring tens of recordtypes and ...
6
votes
2answers
176 views

How to consolidate dates to parent object?

On Account object I have Custom field: Support_end_date I have a custom object called: license. On license I have a custom field called: license_end_date. Each license has a parent object: Account (...
3
votes
1answer
1k views

Can you query/write to a MySQL database from apex code?

Is it possible to work with a MySQL database directly from Salesforce? If not, is the main approach to create some sort of web service to sit in the middle between the two?

1 2 3
4