Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
15 votes

Is there a default TimeZone in which Date fields are stored in Salesforce?

I know this question is very old, but it comes up as one of the top results on google for Salesforce date timezone questions. DateTime fields store the time information in UTC and display the ...
Egor's user avatar
  • 315
9 votes
Accepted

Can't populate a List in a loop

Right now, your loop is modifying the same instance of HCPFacility in each iteration of the loop (and then storing that in the list). Lists store references of the objects you place into them (rather ...
Derek F's user avatar
  • 62.1k
9 votes
Accepted

Will Force.com stop working on salesforce Lightning?

No. The change from Classic to Lightning only affects internal users, and not Communities and other external-facing technologies. Visualforce is still a supported technology and will be for the ...
sfdcfox's user avatar
  • 494k
8 votes

what is difference between JSON generator and JSON parser?

The two are opposite features. The JSONGenerator takes data input and outputs JSON strings. The JSONParser takes JSON string input and outputs objects. If you're sending data to an outside source, ...
sfdcfox's user avatar
  • 494k
7 votes
Accepted

If any student have spouse name populated, then automatically mark them as married = true

You cannot use a validation rule to set a value, you can use it to throw an error if the value is not as you expected. The below will throw an error if the Spouse_Name__c field is blank, and the ...
Chris Duncombe's user avatar
7 votes
Accepted

ANT Force.com Migration Tool and Encrypted Password

You could do some sort of encryption that you can decrypt as an ant target task - like a base64 decode or something. The problem with that is anyone who's savvy enough to be able to look in the ...
Stephen's user avatar
  • 1,551
7 votes

What is the end of life for different Force.com apis?

It's a three year commitment, at least as far as the SOAP API goes: SOAP API End-of-Life Salesforce is committed to supporting each SOAP API version for a minimum of three years from the date of ...
Adrian Larson's user avatar
  • 150k
6 votes
Accepted

Trying to upsert product2 - Method not allowed?

To use PATCH, you need to make sure you're encoding the ID. Assuming the URL in your question was generated literally, that's problematic. The URL should look like: /services/data/v41.0/sobjects/...
sfdcfox's user avatar
  • 494k
5 votes

What is a good set of coding conventions for Salesforce development?

We recently started an Open Source repo on GitHub porting the famous Java Static code analyzer PMD to Apex. We would love to see you join as contributor. We also ported many of the original Java ...
Robert Sösemann's user avatar
5 votes

Unable to login in salesforce using Force.com CLI on windows

The source code for the CLI tool is available on GitHub. You could use that to investigate why the popup isn't occurring. In particular, start from the ForceLogin method. You could also raise an issue ...
Daniel Ballinger's user avatar
5 votes
Accepted

Get the days and hours between two datetimes in decimal format

You can utilize Datetime's getTime() method and compare the two values. Datetime firstTime = Datetime.newInstance(2016, 9, 22, 12, 30, 0); Datetime secondTime = Datetime.newInstance(2016, 9, 23, 14, ...
Lance Shi's user avatar
  • 13k
5 votes
Accepted

Viewing record based on record type

Assuming you want to access the record from List View of that Custom Object or from the related list of Account object. Create a formula field with the same Name and use this code. For example if ...
Santanu Boral's user avatar
5 votes
Accepted

Public Imageurl

You can insert a ContentDelivery, and then get the URL of that. If you have a set of ContentDistributions (and can fill in some blanks that I've removed becomes I'm relying on some of our internal ...
Aidan's user avatar
  • 13.7k
5 votes
Accepted

Apex Trigger not Firing on Mass Update

You'll want to read Best Practice: Bulkify Your Code. Your code essentially only works on the first contact in each batch of 200 records processed, because despite all the gyrations your code goes ...
sfdcfox's user avatar
  • 494k
5 votes
Accepted

Grant "delete" access level on record using Apex trigger

The doc is quite explicit that All may only be used by Force.com Managed Sharing The All access level can only be used by Force.com managed sharing. You are using Apex Managed Sharing - that is ...
cropredy's user avatar
  • 71.7k
5 votes
Accepted

Visualforce Page renderAs pdf styling does not apply

CSS transforms are not supported in PDF mode. Also, anything that starts with "-moz", "-ms", "-o", or "-webkit" are not supported. You'll have to find a CSS1- or CSS2-level support design that meets ...
sfdcfox's user avatar
  • 494k
5 votes

How to stop running test classes from Workbench?

There's a lot of ways to stop the tests from running. In Workbench, you can go to Utilities > Apex Execute, and run the following code: ApexTestQueueItem[] items = [SELECT Id FROM ApexTestQueueItem ...
sfdcfox's user avatar
  • 494k
5 votes
Accepted

Salesforce SSO appending user id to the user name

Looks like you have Subject Type in your Service Provider's SAML, configured as Username in Salesforce. If that's the case, then what you are experiencing is the expected behavior. From documentation: ...
Jayant Das's user avatar
  • 30.6k
4 votes

What is a good set of naming conventions to use when developing on the Force.com platform?

The best and most complete documentation I've found about SalesForce conventions is provided by the CFPB "Consumer Financial Protection Bureau", which is basically a US Government organisation. https:...
Vadorequest's user avatar
4 votes

Create custom Button using Apex code

This needs Metadata api to create a custom button in detail page layout. Here is the working code- MetadataService.WebLink webLink = new MetadataService.WebLink(); webLink.fullName = 'Contact....
Aditya Vijay's user avatar
  • 1,292
4 votes

Force cli query returns random column sequence

This is a known issue as of now (acknowledged by Dave Carroll from Salesforce). I also see your comment on this thread. The workaround suggested to dump the output into CSV/ JSON and use external tool ...
Gaurav Kheterpal's user avatar
4 votes
Accepted

Formula filed to display image, works in classic not in lightning

The issue is in lightning the domain value picked up has /one/resource/GreenBar and thats causing the issue not to have your image formula field rendered . Lets work around this with a global ...
Mohith Shrivastava's user avatar
4 votes
Accepted

Functionality break after Winter '17 release in salesforce

I am not sure but this problem has introduced after winter17 release and before to this release ReportMetadata class was allowing to set the reportScope as null but now I think its mandatory to set ...
user3446467's user avatar
4 votes
Accepted

Force.com vs Zoho Creator

Although this question requires lots of explanation and also it is not suited here for technical terminology. But I would like to answer it as it seems to me you are new on SFSE and really want to try ...
user2809299's user avatar
4 votes

Hide "Submit for Approval" button until @future method completes

You have multiple options Create a new page layout (remove the approval related list) and then create a new Record Type (Let's B) for it. Use a trigger to update the record type to B, once @future ...
J Doe's user avatar
  • 224
4 votes
Accepted

Passing parameters via Force.com Site URL

It is completely possible and follows the same guidelines as any other URL. Construct URL: https://mycompany.com/Signup Add params https://mycompany.com/Signup?param1&param2&param3 How ...
Eric's user avatar
  • 54.2k
4 votes

Best way to deploy code in salesforce

One of the simplest way to deploy code from one environment to another is to use Change Sets. Few clicks and you're done. Another way is to use ANT migration tool. In this you prepare package.xml ...
Rohit Mourya's user avatar
  • 3,871
4 votes

Best way to deploy code in salesforce

More to consider: A variety of IDEs and other tools in addition to the Force.com IDE - see https://developer.salesforce.com/page/Tools Continuous Integration (CI) using the Ant deploy tools - see ...
Keith C's user avatar
  • 136k
4 votes
Accepted

Extract an Installed Package from one Instance and install into another?

Maybe If you know three key pieces of information, and if the app isn't deleted, you can still reinstall it. This assumes it is a "managed package". You will need the "namespace", the "version", and ...
sfdcfox's user avatar
  • 494k
4 votes
Accepted

Salesforce DB connect with SQL Management Studio

Salesforce does not use SQL Server, so you can't just connect from SQL Server Management Studio. A quick Google search found at least one product that claims to allow you to connect from Management ...
Daniel Hoechst's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible