• vodnura
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 5
    Replies
Requirement is to create a pdf report on custom object and schedule them to a particular location. 
 Now we can use 'renderas' to generate a pdf but how to ftp it? can any one suggest an idea.

Appreciate all the help!!
I have visual Flow embed in visual force page. I have look up field in visualforce page which would send its lookup id to flow variable every time a lookupvalue is selected. Now,after selecting a lookup value when u hit save all the details in the visual flow form are deleted.

How do i keep the values in the flow even after i hit save on the VF page.?

Thanks in advance!!
Just curious to know if we could implement two columns in Visual Flow. Did enough research and came to conclusion that its not possible. Please let me know if there are any tweaks that make this possible.
I have a flow embed in VF page and triyng to render it based on record type selction.

--> rendered="{!Product__c.RecordType.Name=='RecordTypeName'}"'

Don't know if i am missing anything? 



Hi all,

 

I am trying to develop a trigger to detect the duplicate Leads based on email. how would this trigger effect the Web to Lead process in case of duplicate email is entered on the web form.??

 

Thanks in advance--

AJ

  • September 20, 2013
  • Like
  • 0

I am newbie to developing test cases. can anybody guide me in writing a test class for the following code.

 

 

public class MyController {
   public MyController(ApexPages.StandardController controller) { 
   
    }
    Lead lead1;
    public PageReference save() {   
       if (lead1.Company == 'Unknown')
              {
              ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please Do not Enter Uknown as Company Name'));
                return null;
            }  
        update lead1;        
        return null;
     }
    public String getName() {
        return 'MyController';
    }
    public Lead getLead() {
        if(lead1 == null) 
            lead1 = [select id,Company,Phone, name,Email,Notes__c,
                     Street,city,State,Availability_for_Call__c,
                      LeadSource
                     from Lead
                     where id = :ApexPages.currentPage().getParameters().get('id')];
        return lead1; 
    } 
}

 

 

  • September 13, 2013
  • Like
  • 0

I have a trigger on Lead which converts to an account/contact and opportunity  based on field update. The issue i am having is its creating a new account every time its getting converted even if the account already exists. Is there a way to merge the account if it  exits instead of creating a new one.

 

Appreciate all the help!!

Thanks-

AJ

After doing some research.. i was rying to convert a Lead to an opportunity using the following code..but keep getting the error mentioned below..can anybody suggest where iam going Wrong...

 

trigger ConvertLead on Lead ( after update) {
for (Lead lead : Trigger.new) {
if (lead.isConverted == false && lead.Approved__c=='YES' )
{

Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(lead.Id);

String oppName = lead.Name;
lc.setOpportunityName(oppName);

LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);

Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());


}
}
}

 

 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger ConvertLead caused an unexpected exception, contact your administrator: ConvertLead: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []: Trigger.ConvertLead: line 15, column 1

 

Appreciate all the help,

Thanks

AJ.

I have created a custom Approval Button. I am unable to add this to the visual force page. CAn we add custom buttons to our VF page??

I am trying to add submit for approval button on my visualforce page. Can any one suggest how  i can achieve it.

 

thanks-

AJ

I am trying out to implement a trigger, which will auto fill lookup fields based on a prticular field. Here is my code. can achieve this using workflow but wanted to know how it works with trigger. 

 

trigger trigger2 on Opportunity (before insert,before update) {

for(Opportunity Oppp : trigger.new){

if(Oppp.Recruiter__c =='A') // lookup field

{

Oppp.Director__c = 'B'; //lookup field

}


}

}

 

 

Thanks-

VODNURA

Inline editing feature is not working after summer 2013 release.

I have visual Flow embed in visual force page. I have look up field in visualforce page which would send its lookup id to flow variable every time a lookupvalue is selected. Now,after selecting a lookup value when u hit save all the details in the visual flow form are deleted.

How do i keep the values in the flow even after i hit save on the VF page.?

Thanks in advance!!
Just curious to know if we could implement two columns in Visual Flow. Did enough research and came to conclusion that its not possible. Please let me know if there are any tweaks that make this possible.
I have a flow embed in VF page and triyng to render it based on record type selction.

--> rendered="{!Product__c.RecordType.Name=='RecordTypeName'}"'

Don't know if i am missing anything? 



I have a trigger on Lead which converts to an account/contact and opportunity  based on field update. The issue i am having is its creating a new account every time its getting converted even if the account already exists. Is there a way to merge the account if it  exits instead of creating a new one.

 

Appreciate all the help!!

Thanks-

AJ

After doing some research.. i was rying to convert a Lead to an opportunity using the following code..but keep getting the error mentioned below..can anybody suggest where iam going Wrong...

 

trigger ConvertLead on Lead ( after update) {
for (Lead lead : Trigger.new) {
if (lead.isConverted == false && lead.Approved__c=='YES' )
{

Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(lead.Id);

String oppName = lead.Name;
lc.setOpportunityName(oppName);

LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);

Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());


}
}
}

 

 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger ConvertLead caused an unexpected exception, contact your administrator: ConvertLead: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []: Trigger.ConvertLead: line 15, column 1

 

Appreciate all the help,

Thanks

AJ.

I am trying to add submit for approval button on my visualforce page. Can any one suggest how  i can achieve it.

 

thanks-

AJ

Inline editing feature is not working after summer 2013 release.