• Dipak Nikam
  • NEWBIE
  • 65 Points
  • Member since 2013
  • Mindtree Limited

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 5
    Replies
I have just created a formassembly form which we sent to potential clients. Those potential clients are Leads and a lot of their information is in the database already. Once they have completed the form and returned it to us the Lead status automatically changes from "Identified" to "Signed". At that point I ould like to set up a trigger that immediately converts those leads into a Person - Account. Anyone knows how I can achieve this?

How to stamp a date in custom field . i have created a formula field    IF(  ISPICKVAL(Confirmed__c, 'yes') , today() ,'').

 

in picklist if yes is selected, today date should populate, when no is selected it should give no value.

 

@isTest
public class ValidateTestStartMethod {
 static testmethod void method1() {
     
    for (Integer i= 0;i<95;i++) {
         Account[]acctlist = [select id from Account limit 1];
     }
     
     Test.startTest();
     for (Integer i=0;i<=10;i++) {
         Account [] ac = [select id from Account limit 1];
     }
     Test.stopTest();
 }

I completely understand as per best practices we should not write any query inside the for loop. Here I just wanted test the purpose of Test.StartTest and Test.StopTest methods. 

As per Salesforce document, Test.StartTest allocates fresh set of governor limits. But unfortunately above code failing due to SOQL query limit exception. Any thoughts, why is it so ?  Thanks in advance :)

User-added image



Regards,
Dipak Nikam
 

Hi,

I have created a visualforce page where i've used standard controller as one of the custom object from my organisation.

On custom object , I've look up which has certain criteria defined. But when i use this Lookup as inputfield on Visualforce page, the look up window doesnt showing any records on it. The same look up filter works in Salesforce Native UI.

Can any one let me know why this is happening. Appreciatethe help.

Thanks in advance.
Dipak

@isTest
public class ValidateTestStartMethod {
 static testmethod void method1() {
     
    for (Integer i= 0;i<95;i++) {
         Account[]acctlist = [select id from Account limit 1];
     }
     
     Test.startTest();
     for (Integer i=0;i<=10;i++) {
         Account [] ac = [select id from Account limit 1];
     }
     Test.stopTest();
 }

I completely understand as per best practices we should not write any query inside the for loop. Here I just wanted test the purpose of Test.StartTest and Test.StopTest methods. 

As per Salesforce document, Test.StartTest allocates fresh set of governor limits. But unfortunately above code failing due to SOQL query limit exception. Any thoughts, why is it so ?  Thanks in advance :)

User-added image



Regards,
Dipak Nikam
 
I have just created a formassembly form which we sent to potential clients. Those potential clients are Leads and a lot of their information is in the database already. Once they have completed the form and returned it to us the Lead status automatically changes from "Identified" to "Signed". At that point I ould like to set up a trigger that immediately converts those leads into a Person - Account. Anyone knows how I can achieve this?
I was trying to create a VF dashboard component with a custom VF page. But the VF page did not render in the dashboard component.
I am able to view the page otherwise.

I figured this was happening only for the VF pages which I create and not for any VF pages of managed packages. Increased the height of the 
dashboard component to see that, the page was actually being rendered, but not just the VF page.The VF page plus the page editor ( see image)

I disabled the development mode, and now the page renders properly in the dashboard component. Am I missing something. Why is the behaviour so?

custom VF dashboard component

How to stamp a date in custom field . i have created a formula field    IF(  ISPICKVAL(Confirmed__c, 'yes') , today() ,'').

 

in picklist if yes is selected, today date should populate, when no is selected it should give no value.

 

When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.  

 

That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.