-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
15Questions
-
12Replies
batch apex order guaranteed or not?
-
- sdu
- October 26, 2017
- Like
- 0
- Continue reading or reply
Callout from scheduled Apex not supported.
Callout from scheduled Apex not supported.
So I search and found a post that says to use @future. So I added that in my schedulable class. But then I get this error:
Database.executeBatch cannot be called from a batch start, batch execute, or future method.
Can someone help me find a solution? Thanks a lot.
-
- sdu
- September 22, 2015
- Like
- 0
- Continue reading or reply
Why debug logs get deleted automatically?
-
- sdu
- August 06, 2015
- Like
- 0
- Continue reading or reply
Where to find currency code
-
- sdu
- July 06, 2015
- Like
- 0
- Continue reading or reply
Workbench or developer console not available for PE edition?
-
- sdu
- June 09, 2015
- Like
- 0
- Continue reading or reply
Access google analytics
-
- sdu
- June 04, 2015
- Like
- 0
- Continue reading or reply
help: cannot install force.com ide
When I run the force.com ide installer, keep getting the error JVM terminated: exit code -1. Any has any idea why?
-
- sdu
- June 20, 2013
- Like
- 0
- Continue reading or reply
Help: where is SignupRequestInfo?
I am trying to test the new feature in Spring where you can use API to create a new trialforce org. In the example (java) provided, it's using the class SignupRequestInfo. But where/how do I get the jar file for this class? I tried generating jar for tooling WSDL, Apex WSDL, Partner WSDL, but none of them contain this class. Anyone can help me?
-
- sdu
- May 01, 2013
- Like
- 0
- Continue reading or reply
parse decimal bug?
Why following code does not work in Sweden locale?
Decimal d = 12345.67;
String s = d.format();
Decimal dd = Decimal.valueof(s); // throws 'System.TypeException: Invalid decimal: 12 345,67'
-
- sdu
- December 20, 2012
- Like
- 0
- Continue reading or reply
Developer console in PE org cannot run scripts?
Anyone know if that is the salesforce limitation?
-
- sdu
- July 11, 2012
- Like
- 0
- Continue reading or reply
Problems deleting records when there are large number of child records
If I have a master and a child object and there are lots of records in the child object. It is impossible to delete these records in Apex code. The error is 'DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records'.
Note that I am using an Apex batch to delete the records from the child object first, then delete the records in the parent object and the error occurs when I try to delete the records in the master object. According to salesforce support, the reason for the error is the child records are still in recycle bin, and when deleting the master records, they need to be moved to another table somehow. If this is the only obstacle, I can delete the records permenantly by using Database.emptyRecycleBin(). But the error still occurs even after I empty the recycle bin. Aparently the records are still somewhere and salesforce still need to do something with them. Only after salesforce support manually cleaned them out, I am able to delete the master records.
Salesforce support says this is working as designed. I just do not see this make sense. We are building an app, have lots of customers, and they may need to perform such deletion very often. We have to open ticket with salesforce everytime we hit the error?
-
- sdu
- June 11, 2012
- Like
- 0
- Continue reading or reply
Why test code cannot see data in sfLMA__License__c??
There are lots of rows in this object, but when I run a query from it in a test method, it is not seeing any rows. Why? How am I suppose to test my code if I cannot see the data??
-
- sdu
- April 18, 2012
- Like
- 0
- Continue reading or reply
Why test method cannot make callouts??
How am I suppose to get enough test coverage if most of my code is doing callouts but test method does not allow callouts??
-
- sdu
- April 18, 2012
- Like
- 0
- Continue reading or reply
Transaction isolation level
Anyone knows what is the default isolation level and if it is possible to change that? I have a use case as follows: I want to insert a record in an object if it does not exist, otherwise just update it. So I am doing a select (where say name = <some value>), if no record is returned, I create a new one, otherwise I update the existing one. But it appears that if two such calls are executed at the same time, I would end up creating two records (with same name). Anyone knows how to solve this problem?
-
- sdu
- November 21, 2011
- Like
- 0
- Continue reading or reply
Aggregation and multi-currency issue
I noticed when running an aggregation query, salesforce automatically converts all currency values into the corporate currency. I understand if the data (the query works on) has more than one currency, you have to convert them into one in order to do the sum or min etc. But in my case, the data is all in one currency (but different from the corporate) so there is no need to convert. Is there a way to turn off the convertion because I want to display the data in user's local currency? Also, I am using dated conversion rates, and my query is on a custom object, how does salesforce pick the conversion rate to use?
-
- sdu
- May 24, 2011
- Like
- 0
- Continue reading or reply
Where to find currency code
- sdu
- July 06, 2015
- Like
- 0
- Continue reading or reply
Access google analytics
- sdu
- June 04, 2015
- Like
- 0
- Continue reading or reply
System.NullPointerException: Attempt to de-reference a null object
I havent coded apex in a long time, this trigger was working for the past 8 months and then all the sudden we get this:
Apex script unhandled trigger exception by user/organization: 005U0000000fp0q/00DU0000000Kh8N
changeLeadStatus: execution of BeforeInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.changeLeadStatus: line 7, column 1
Any help would eb appricated
1 | trigger changeLeadStatus on Task (before insert, before update) { |
- Luis Gutierrez
- December 20, 2012
- Like
- 0
- Continue reading or reply
parse decimal bug?
Why following code does not work in Sweden locale?
Decimal d = 12345.67;
String s = d.format();
Decimal dd = Decimal.valueof(s); // throws 'System.TypeException: Invalid decimal: 12 345,67'
- sdu
- December 20, 2012
- Like
- 0
- Continue reading or reply
Why test code cannot see data in sfLMA__License__c??
There are lots of rows in this object, but when I run a query from it in a test method, it is not seeing any rows. Why? How am I suppose to test my code if I cannot see the data??
- sdu
- April 18, 2012
- Like
- 0
- Continue reading or reply
Creating Excel File in Apex code
I'm wondering is it possible to create Excel or CSV file in apex code (as attachment) is it possible ? currently i only see it works with VF page, but i'm looking to do it in apex code not using vf page, I don't see any options.
Any help is appreciated.
Thanks
Ram
- ram123
- December 29, 2011
- Like
- 0
- Continue reading or reply
Transaction isolation level
Anyone knows what is the default isolation level and if it is possible to change that? I have a use case as follows: I want to insert a record in an object if it does not exist, otherwise just update it. So I am doing a select (where say name = <some value>), if no record is returned, I create a new one, otherwise I update the existing one. But it appears that if two such calls are executed at the same time, I would end up creating two records (with same name). Anyone knows how to solve this problem?
- sdu
- November 21, 2011
- Like
- 0
- Continue reading or reply