Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 58237

Questions relating to Apex, the native programming language for the Force.com platform. Use it for general questions on syntax, errors, constructs, and rules of use. Most questions should include a code *excerpt* to help answerers understand specifically what has gone wrong or why you need help.

0 votes

Heroku sync with salesforce

You could try CopyStorm from here: https://www.capstorm.com/backup/ You can pick whichever objects you want to sync, and save the data in all sorts of forms - we save it all in SQL Server. You can d …
cyberspy's user avatar
  • 220
0 votes
0 answers
138 views

Prettier, in VS Code, failing to format SOME VF Pages

I'm using Prettier, along with the plugin prettier-plugin-apex in VS Code, to format Salesforce classes and Visual Force pages etc. …
cyberspy's user avatar
  • 220
0 votes
0 answers
303 views

Opportunity Line Item UnitPrice Sometimes not updating in BeforeInsert trigger

In my BeforeInsert trigger for OpprtunityLineItemTrigger, I check if the product requires VAT (sales tax in the US) and add it to the UnitPrice if it does. This works most of the time, but sometimes f …
cyberspy's user avatar
  • 220
0 votes

how to test a future method which makes callouts?

As the callout isn't actually done, it's a bit pointless testing what it returns! All the data returned by the HttpResponse is what you set in the Mock class.
cyberspy's user avatar
  • 220
1 vote

Best way to detect that code is running in InstallHandler context?

It would have been far better for Salesforce to have provided an API call, like Test.isRunningTest() to do this, but here we are. The idea above is great, but needs another class. Why not just put the …
cyberspy's user avatar
  • 220
0 votes
1 answer
43 views

Property type misidentification in VisualForce Page

I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process. There were a few deploy errors but I've fixed all but two types. This is one …
cyberspy's user avatar
  • 220
0 votes

Property type misidentification in VisualForce Page

I resolved the issue - I changed public Account acc in the apex extension to public Account acnt and changed it in the VF Pages too, and now these errors have gone. …
cyberspy's user avatar
  • 220