The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
23 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 ...
10
votes
1answer
74 views

SOQL: (WHERE x IN(a,b)) does return 2 records, but (WHERE x = a OR x = b) returns only 1 record… Why?

I'm trying to retrieve some ContentVersion records, but I'm having a lot of issues with it. After some research it seems as if the records are divided into two 'sets' as it were, and Salesforce in ...
3
votes
1answer
19 views

What is 'external data' in Database.deleteAsync(sobject) salesforce documentation

While going through the Database Class documents I couldn't understand few definition. deleteAsync(sobject) Initiates a request to delete the external data that corresponds to the specified ...
2
votes
1answer
59 views

Capturing record events without triggers

Is there any way other than Apex Trigger/Process Builder/Workflow to capture record events programmatically? Does Salesforce have any sort of CRUD event publisher that can be somehow subscribed to? ...
0
votes
1answer
21 views

How to call QueryLocator.iterator() twice

I am using a QueryLocator in my code. In one part of the code I call the .iterator() method to verify that it is not empty. Now I am going through writing a unit test and finding that I am unable to ...
3
votes
2answers
51 views

Links to Documentation for Database.* DML Method? Gone from APEX Docs

So we've got the usual DML statements insert accts; and we've got the database class dml statements, e.g. Database.insert(accts, false). Had a team member ask me a question about the parameter ...
0
votes
1answer
26 views

Test class running through an if statement

I have the following code in one of my batches: if (exclusionsize == 1){ exclusion1 = exclusioncut[0]; System.debug('Preforming the Query: ' + 'select ' + TrackingNumberString + ...
0
votes
0answers
31 views

Get complete list of Forecast Categories & Labels

I'd like to programatically (in Apex or SOQL) get the full list of ForecastCategories and their corresponding ForecastCategoryNames for an org i.e. the list that you can access in the UI by navigating ...
2
votes
0answers
24 views

What is the salesforce equivalent of Microsoft's Northwind database

This sounds like an obvious question but I have not been able to find the answer anywhere. Does Salesforce have an equivalent of Microsoft's Northwind database? My problem is that I have gone ...
0
votes
1answer
31 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 ...
2
votes
1answer
28 views

Checking Database state before updating a record

Is there anyway to check the current database state (version or whatever applicable term) of a record, before performing DML on that? Scenario : user 1 retrieves record A user 2 retrieves record ...
2
votes
2answers
96 views

I'm building a database in unlimited version but I think i'm doing this wrong

I think I did this wrong? Can someone advice me? I basically paid a $250 month unlimited service to build a database but I would like to sell it on appexchange. So as I build, I realized that I ...
0
votes
1answer
37 views

Setting database.savepoint in one method and rolling back in another method

I have three objects ObjectA, ObjectB, ObjectC. ObjectA is the grand parent, ObjectB is child of A & Object C is child of B. I'm providing a button on ObjectA page layout to create/edit records ...
2
votes
2answers
84 views

execute apex batch only if not running

I have below trigger where I am executing a batch apex. I need to see whether the batch job is currently not running. Can someone help me here? Apex trigger: trigger BatchTrigger on ...
0
votes
1answer
201 views

Mass transfer Contact owner

I want to mass transfer some of contacts to another user. I tried to use the data management and use the feature but I am not able to get the contacts displayed. Am I not following the proper way or ...
0
votes
0answers
48 views

How to integrate Oracle database to Salesforce.com?

I have to integrate Oracle SQL Developer with Salesforce.com. The situation is whenever I am Performing CRUD operations on my Oracle database it should reflect on Salesforce.com (like outlook ...
0
votes
0answers
18 views

Exact Target in Dynamics CRM - State and Status Codes for Email Sends

I'm looking for documentation on the status codes used in Exact Target for Microsoft Dynamics CRM. I'd love to get something resembling this: ...
2
votes
1answer
597 views

How to get data type of any object's field in SOQL

how to i get datatype of any filed in SOQL?
1
vote
1answer
34 views

Accessing Data Externally - Any tools?

Bit of a back story... We have a business requirement where out of a team of 50 people only 20 need actual SF licenses. The other 30 only need access to a very small portion of data and only need ...
2
votes
1answer
38 views

Do we have a Salesforces global database for all clients that installed my package?

Please help me with this question and please correct me if I misunderstand anything. I am developing a package, in this package, I created some custom objects. I also have my external Web Service and ...
3
votes
1answer
165 views

How to know which Database.SaveResult instance corresponds to my SObject

I am currently trying to Update and Insert to collections of SObjects. I perform the actions(update&insert) separately, obtaining a Database.SaveResult Array as feedback. The problem is that I ...
1
vote
1answer
108 views

Converting Database.SaveResult error messages in more friendly feedback messages

I am implementing an interface from where you can update & insert records in SFDC, through a CSV file. After I process the files accordingly to my specifications, I want to perform an Update and ...
2
votes
1answer
45 views

How create new database for testing

/** * Get template folder */ public List<SelectOption> getFolderList() { // Initialize a selectoption list List<SelectOption> options = new List<SelectOption>(); // ...
14
votes
1answer
593 views

How to best use the “Test Data Builder” pattern in a database context?

I need to setup test data in proprietary cloud platform (Salesforce.com) where I have no access to advanced testing frameworks. Besides that you can read my code example like it would be Java. ...
3
votes
0answers
36 views

How can we keep our tasks accessible to view and report on while not having them count against the data storage limit?

The org I am working with right now is using 210% of its allotted data storage. Most of the storage space is taken up by tasks (over 31M records). Is there a way to decrease the data usage while ...
1
vote
3answers
92 views

Custom Save on New/Edit page - Is this valid code?

In my controller extension I have a custom save method that works for New and Edit scenarios also saves modified child records The below code works in all unit tests but starts to show strange ...
2
votes
1answer
240 views

Is upsert the right thing to save new or existing records?

In many of my Controller extensions I have save action methods that work for NEW and EDIT scenarios. I simply use upsert record instead of update / insert record in such cases. But now I am running ...
1
vote
1answer
24 views

'<<<' characters are lost in a field after saving to the database?

I have a field on a custom object before saving to the database as below: <span>>>> just some text <a class="Link" href="/55555555555AAA" >John Travolta</a> ...
4
votes
1answer
389 views

Database class commit

Why does Database class not provide commit method so that we can commit explicitly as well while in a transaction as we can do a rollback.
0
votes
2answers
180 views

Old style JOIN (ANSI JOINs) syntax is not allowed. Please use standard syntax

A client has asked me to write a rather complex SQL query to be used on Salesforce. When trying to implement the finished query on the Queries page I get the following error: Old style JOIN (ANSI ...
1
vote
1answer
240 views

Is there a way to create a master-detail to the Campaign Member object

TLDR; Is there a way to build a joint object between the campaign member and account objects? If not, what are some other methods to design the SFDC database to capture the specific individuals that ...
2
votes
1answer
368 views

Storing json as a String field is giving wrong value

I have been developing an Apex Trigger where I build a json string from an incomming Event. What I do is serialize the event into the json at first, then deserialize it as a Map and add to it some ...
0
votes
1answer
99 views

Database.rollback() risks and alternative

I've inherited some complex logic that does several different DML actions within the same (fairly long) method and if there are failures I need to revert everything that's been previously done. The ...
3
votes
1answer
450 views

Can Salesforce function as a “data warehouse?”

I am attempting to integrate on-premises software with our Salesforce Org. Our timekeeping system uses a PostgreSQL database to store time entries committed by staff. Salesforce's role is relegated to ...
8
votes
1answer
1k views

Can I tell how many records in a Database.QueryLocator()?

According to the documentation, in a batch a Database.QueryLocator can retrieve up to 50 million records. A maximum of 50 million records can be returned in the Database.QueryLocator object. If ...
0
votes
1answer
84 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 ...
3
votes
2answers
3k views

Problem with Database.update()

I have some accounts to update but some validation rules can failed. So to avoid this I use the Database.update() function to update accounts even if some DML exception occur. try { ...
1
vote
1answer
494 views

Database.DeleteResult.getErrors() question

I am trying to connect specific records that fail to delete in my batch job to their error messages. I thought my solution was working, but I checked the size of .getErrors() and it's size 1. My test ...
13
votes
1answer
420 views

How can adding a Subselect make a SOQL query non-selective?

I have a SOQL Query with subquery that fails to execute because it is non-selective. I don't understand why and cannot interpret the results. All I know is that tearing parent und sub query apart ...
7
votes
1answer
214 views

Database.DMLOptions - How to prevent Chatter Group Auto-Follow trigger from generating email

Currently I have a trigger which auto-follows specific groups in our organization when a new user is brought onboard. The auto-follow trigger feature works great! However, we have quite a few groups ...
2
votes
3answers
226 views

Backing up sf data in external DB [closed]

Hi I need to back up my sf org data into my local database. I am looking out for tools or any best practices to this at specific time intervals or regular time intervals. Can any one suggest what ...
3
votes
1answer
2k views

Salesforce database structure for sales cloud and service cloud

Do any one here have any doc related to database model of salesforce. Model of sales cloud and service cloud. I go through doc which salesforce have ...
3
votes
1answer
121 views

External SalesForce Forms

Is it possible to create external SalesForce Forms that can populate fields in the same way as inside salesforce? We offer online teaching and the idea is that teachers, after every lesson, can fill ...
1
vote
2answers
127 views

Tally the number of items in a related lists on a related object

Hi guys I am a complete n00b with SalesForce.com, so please forgive me if my question is too basic, but I have been trying for about 2 days now and I feel like I am getting nowhere I have a database ...
2
votes
2answers
325 views

Salesforce Mirrored To mySQL - Reporting Tool Suggestions?

We are setting up mirroring our Salesforce to mySQL using CopyStorm. One object in particular will be mirrored with no deletion (all data ever will accumulate in mySQL while in Salesforce it will ...
0
votes
1answer
2k 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 ...
1
vote
2answers
420 views

Data replication from MS SQL to Salesforce

I'm trying to setup our MSSQL server to "replicate" new insert/updates to Salesforce, but it appears that there is no official way to do it via Salesforce. Is there a recommended way? Background: I'm ...
1
vote
1answer
2k 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
279 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
752 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 ...