• 8hrWait
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies

trigger TimestampFields on Survey__c (before update, before insert)
{
for (Survey__c c : Trigger.new)
{
Survey__c oldSurvey = Trigger.oldMap.get(c.ID);

if (c.Field1__c != oldSurvey.Field1__c) {
String new1 = c.Field1__c;
String old1 = oldSurvey.Field1__c;

String newStuff1 = old1.difference(new1);

 

Error: Compile Error: Method does not exist or incorrect signature: [String].difference(String)

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm

Hi.

 

I have a string of the format - 2013-01-10T18:01:43.017+0000.
What is the best way to convert the above string format to Datetime?

 

Thx

Hi,

 

Can anyone please let me know, how to retrieve database records using IDs in 'IN' clause for a query on a custom object.

 

The below query
select Id, Name from <customObject>__c gives all records


But, if a where clause is added to filter by Ids, no results are displayed.
For example,
select Id, Name from <customObject>__c where ID in (Set<String>) -> gives no results

 

Thx

How can i get the timestamp fo the ORG in the Apex code?

 

Thanks in Advance.

Hi,

 

In the Force.com IDE, the content assist works sometimes and not at times (using ctrl+space).

Please let me know, if we have any plugin to avoid this?

 

or any particular thumb rule to get this working everytime?

 

Thanks

Hi,

 

Please let me know, how I can refresh my workspace to get the Winter '13 release features.

 

Thanks,
Siva

  • September 27, 2012
  • Like
  • 0

Hi,

 

Can anyone please let me know, how to retrieve database records using IDs in 'IN' clause for a query on a custom object.

 

The below query
select Id, Name from <customObject>__c gives all records


But, if a where clause is added to filter by Ids, no results are displayed.
For example,
select Id, Name from <customObject>__c where ID in (Set<String>) -> gives no results

 

Thx

How can i get the timestamp fo the ORG in the Apex code?

 

Thanks in Advance.

Hi,

 

In the Force.com IDE, the content assist works sometimes and not at times (using ctrl+space).

Please let me know, if we have any plugin to avoid this?

 

or any particular thumb rule to get this working everytime?

 

Thanks

I'm trying to implement the new Test.LoadData() method (page 174 -> https://na7.salesforce.com/help/doc/en/salesforce_winter13_release_notes.pdf) and the force IDE is telling me that Test.LoadData() returns void, not a List of sObjects.

 

What gives?

I'm trying to access static fields of a class from within a test class, with a statement like this:

 

genericObject.genericField = outerClass.staticVariable;

 

And the Force IDE is telling me 'Variable does not exist' when I try and execute the test.  I'm not able to find anything about special considerations when accessing static class members within tests.  Am I doing something fundamentally wrong here?

Hi,

 

Please let me know, how I can refresh my workspace to get the Winter '13 release features.

 

Thanks,
Siva

  • September 27, 2012
  • Like
  • 0

trigger TimestampFields on Survey__c (before update, before insert)
{
for (Survey__c c : Trigger.new)
{
Survey__c oldSurvey = Trigger.oldMap.get(c.ID);

if (c.Field1__c != oldSurvey.Field1__c) {
String new1 = c.Field1__c;
String old1 = oldSurvey.Field1__c;

String newStuff1 = old1.difference(new1);

 

Error: Compile Error: Method does not exist or incorrect signature: [String].difference(String)

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm