• C. Praveen kumar
  • NEWBIE
  • 5 Points
  • Member since 2014
  • Force.com Developer
  • NTT Data GDS

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 5
    Replies
Hi All,

  How can we give our own custom LastModifiedaDate  to records while inserting in test classes.

We have class which has a query

  
if (jobType == PROCESS_DEL_VIOC_FRANCHISE_RECORDS) {
            query = Database.getQueryLocator([SELECT Id FROM Lead  where RecordType.Name=:RecordTypeUtil.VIOC_Franchise_Web_lead and LastModifiedDate < LAST_N_YEARS:3]);
        }

While writing test class for this class, we are trying to create some test data. To meet above condition we have to give LastModifiedDate  which must be 3 years old. How can we write a test class in this situations.

Any help is really appreciated.

Thanks,
Naveen.
Hi

I have created a multi approver approval process in which the record has to under go all the approval steps.
When I submit the record, it is getting approved after the first approval without submitting to next approver.

Please suggest what changes to be done to undergo all the levels of approval.

Thanks in advance.

Thanks,
Manjunath 
Hi All,

I have three fields.

Month__c -> Denotes month value (Ex. Jan, Feb etc)
Year__c -> Denotes Year value (Ex. 2013, 2014 etc)
Bill_Month__c -> Formula field need combination of both Month+Year (Ex. Nov 2013)

Please find below image.

User-added image

Thanks in advance.

Thanks,
Manohar
Hi Everyone!

I am trying to create a validation rule that makes several picklist fields mandatory when a checkbox field is selected.

Thanks in advance!
Hi Everyone,

I have a custom Quote Field, lets call it 'Count'. I want the value of Count to come from looking at all the names of the products in the Quote Line Items and generating a value. I've figured a few things out on my own but my resources are running dry. Below is everything I've figured out

QuoteLineItem - the name of the object containing each product
Product2 - the product name that is displayed in QuoteLineItem
Count - this should be a custom formula field. the formula should look something like what I have below ->

count = 0;
For (all QuoteLineItem:x in Quote object){
    If (x.Product2 = 'ABC')
        count = count + 5;
    If (x.Product2 = 'DEF')
        count = count + 10;
     If (x.Product2 = 'GHI')
        count = count + 5;
}

Am I thinking about this right? Can someone help me pull this thing together.

Thanks!
T