• Nisha Babu 8
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 11
    Replies
Hi,

I have to compare the LastModifiedDate with the custom setting date.

Custom_Setting__c custom = Custom_Setting__c .getValues(Object1);
String query1 = 'SELECT Id FROM '+ Object1+ ' WHERE LastModifiedDate < :'+ custom.Date__c;
CustomSetting date is in dateTime.

The query is not showing any error ,but it is not giving the expected result :(
Anyone could help me on that?

With Regards,
    Nisha
Hi,

I need a batch class that can run any query with any number of clause in where part.
The query is passed to the batch class from another class.
Suppose for the first execution we decided the query to have two clause in WHERE part.
In the next execution there is some three clause in WHERE part.
The batch class must be able to execute both the query without changing the batch class code.

Regards,
  Nisha 
Hi

How to get the value for an field from the keySet().
I don't want the value for all fields but  value for some fields in the object.
And I have to store the selected key and value to another map
Hi

Construct a query dynamically by checking the non-empty field . If a field is not empty then add it to the query for comparison, if the field is empty then just bypass the field.

Suppose : Account is not having stages.
So in custom setting there is a field for stages as well.
So for the account object the field should not be included in the query
CreatedDate<'Comparison date from custom'  AND Amount< $10 and the stages should not be included.
Moreeover the query should be dynamically created by using some map.....
Cannot specify the created date ,instead have to specify by using some map values
How to implement it?

Regards,
   Nisha
Hi,

I have to construct a query based on the custom fields added in the custom setting and have to store in a field inside the custom setting?
Is it possible for the query to take the values defined in the custom settig dynamically?

Regards,
  Nisha
 
Hi,

I have to compare the LastModifiedDate with the custom setting date.

Custom_Setting__c custom = Custom_Setting__c .getValues(Object1);
String query1 = 'SELECT Id FROM '+ Object1+ ' WHERE LastModifiedDate < :'+ custom.Date__c;
CustomSetting date is in dateTime.

The query is not showing any error ,but it is not giving the expected result :(
Anyone could help me on that?

With Regards,
    Nisha
Hi

How to get the value for an field from the keySet().
I don't want the value for all fields but  value for some fields in the object.
And I have to store the selected key and value to another map