• Sarge
  • SMARTIE
  • 645 Points
  • Member since 2010

  • Chatter
    Feed
  • 25
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 134
    Replies

Could NOT install force.com IDE in eclipse (Kepler). Also http://www.adnsandbox.com/tools/ide/install/ is not working. Can you please give right location path?

Hi everyone,

 

        If there are multiple field updates configured in an workflow actions, does the individual field update fire according to the list or in random order?

 

      Ideally I assume it to be in the order of the list displayed in workflow actions page, but has anyone witnessed it?

 

 

Thanks

Hi,

       I am new to force.com. I have integrated force.com IDE with Eclipse to create my application.

I found a file called salesforce.schema which contains list of default objects. Also i have created custom object, that also be listed.

At this point, i have a doubt that is salesforce.schema is a XSD or DBMS?

 

waiting for your valuable suggestions

 

 

Thanks

paul

 

Hi,

 

I have a custom button which has "Onclick" execute java script.

I am looking at the status of a field and then redirecting the user appropriately.

But i am encountering an error, which i am unable to figure out.

 

if({!Opportunity.StageName}=='Prospecting')

{

 alert('You cannot perform action');

}

 

else

{

 

&serverUrl={!API.Partner_Server_URL_80}
&id={!Opportunity.Id}
&reportid=00O600000023k2f?pv0={!Opportunity.Id}
&reportid=00O600000023k2k?pv0={!Contact.Id}
&reportid=00O600000023k3O?pv0={!Opportunity.Id}
&reportid=00O600000023k3T?pv0={!Opportunity.Id}
&reportid=00O600000023qu9?pv0={!Opportunity.Id}
&ESVisible=1
&ESAgreementName={!Opportunity.Name}
&ESSignatureType=2
&TemplateId={!IF ( Opportunity.RecordTypeId = "012600000005Eso", IF ( ISPICKVAL ( Opportunity.Payment_Methond__c , "Credit Card" ) , "a0G60000004z7sv" , "a0G60000004z7t0" ) , IF ( ISPICKVAL ( Opportunity.Payment_Methond__c , "Credit Card" ) , "a0G60000003Zej9" , "a0G60000003ZejE" ) )}
&ds4={!IF( $Profile.Name = "System Administrator", "0", "1")}
&ds7={!IF( $Profile.Name = "System Administrator", "0", "4")}

window.location.href="https://www.appextremes.com/apps/Conga/PointMerge.aspx?sessionId={!API.Session_ID}&serverUrl={!API.Partner_Server_URL_80}&id={!Opportunity.Id}&reportid=00O600000023k2f?pv0={!Opportunity.Id}&reportid=00O600000023k2k?pv0={!Contact.Id}&reportid=00O600000023k3O?pv0={!Opportunity.Id}&reportid=00O600000023k3T?pv0={!Opportunity.Id}&reportid=00O600000023qu9?pv0={!Opportunity.Id}&ESVisible=1&ESAgreementName={!Opportunity.Name}&ESSignatureType=2&TemplateId={!IF ( Opportunity.RecordTypeId = "012600000005Eso", IF ( ISPICKVAL ( Opportunity.Payment_Methond__c , "Credit Card" ) , "a0G60000004z7sv" , "a0G60000004z7t0" ) , IF ( ISPICKVAL ( Opportunity.Payment_Methond__c , "Credit Card" ) , "a0G60000003Zej9" , "a0G60000003ZejE" ) )}&ds4={!IF( $Profile.Name = "System Administrator", "0", "1")}&ds7={!IF( $Profile.Name = "System Administrator", "0", "4")}";

 

}

 

 

The error is:

 

 

A problem with the OnClick JavaScript for this button or link was encountered:

missing ) after condition.

 

 

It seems to me correct. i do not know what i am missing. can anyone help me here?

 

Thanks,

Sales4ce

 

.

Hey all,

 

I'm trying to work on a visualforce change that will rerender a pageblock with associated contacts whenever an account is modified in the lookup field. 

In other words, when an account is changed, the appropriate contacts should be displayed (to work with them later). 

 

I have the inputField displaying the Account lookup, but it's not changing on a change.  I tried using onchange... didn't work.  I just need to reference the account lookup within my standard controller and work with a rerendered.  Can anyone help out?

 

Code:

<Apex:inputField value="{!Call_Attendee__c.Attendee_Account__c}" onchange="Do Something"/>

 

 

I have a use case where, when a lead is converted, I need to convert all other leads from the same company.  I have a custom object (Lead Company) that the leads are linked to via Lookup.  The Lead Company has a flag Converted__c which is set when a lead is converted, from a lead <before update> trigger and the Lead Company record also then records the Account Id of the converted lead.  There is then a trigger on the Lead Company which detects that the flag has been set and then converts all other leads on that account to contacts.  Or at least, that is what is intended, but I get an error saying that it is recursive, as the conversion process then calls my lead trigger again.

 

So, I understand where the error is coming from, but what I can't work out is how to achieve this objective without the recursion.

 

Can anyone help me with a better solution?

 

Thanks

Hi All,

 

I have a visualforce page to search all accounts, now i simply wants to display all the searched records page wise i.e. having 20 records per page.

 

For ex. After searching all accounts, i have 500 records displayed. Now, i want to display only 20 records per page and enable the user to move to the next 20 records till last record.

 

Please let me know how can i do that.

 

Thanks

I'm trying to add a visualforce page to a detail layout. I've started off with a simple blank page with 'Hello World' and dragged it onto the detail page layout in it's own section. I've saved it all successfully.

 

The section appears and the page is set to it's appropriate width and height. But the page is blank. Why is this?

 

The page is set to it's standardController correctly.

We have three people at my firm who work leads.  One of them works all leads created between 7:00pm and 9:59am as well as everything from Saturday and Sunday.

 

Is there a way to assign leads to a queue or users based upon the time and day of week?

 

Additionally, is there a way to display created time in addition to created date in lead view?

 

Displaying the time in a lead view is something that has been requested and could create a workaround for assigning leads based on day of week and time.

 

We're on Professional Edition.

 

Thanks in advance for the help!

hello all

 

i have 5 pick list in the Acct that i need copy to the case but they need to update the same picklist in the case for example

 

property info (in account objecct) is a picklist with the value A, B ,C

 

and i have

 

Property info (in the case) is a picklist with value A, B, C

 

both fields have exactly the same values im pretty sure there is a better way to update the fields other than create a rule for each option i have in the picklist to update in the case 

 

any ideas

Hello All,

 

Can somebody help me pleaseeeeeeeeeee............???

 

Problem -

if someone enters Number__c then Company__c should become as required..... But the problem here is Company__c is a Picklist value.

 

Validation Rule -

ISCHANGED( Number__c ) && (isblank(Company__c))

 

 

Error: Field Company__c is a picklist field. Picklist fields are only supported in certain functions.

 

Thanks,

Dan 

Is it possible to make the sum of all the non-empty lookup fields (contact 1, 2 & 3) and automatically show this value in another field (# persons)

 

 

Thanks in advance!

 

 

Hi All,

 

I am trying to write a test method for controller extension Apex class.I want to test the "save" functionality of an Apex class.Follwing is the code.

public class jobcntroller {

 

    public Job_Details__c job{ get; set; }

     public String CompanyName;

     public void setCompanyName(String CompanyName)

    {

        this.CompanyName = CompanyName;

    }

    ApexPages.StandardController controller;   

    String s;

 

 

 

 

    public jobcontroller(ApexPages.StandardController stdController) {

        job = new Job_Details__c ();    

        controller = stdController;

 

    }   

 

   public PageReference mysave() {

     Schema.DescribeSObjectResult result = ob_Details__c.sObjectType.getDescribe();    

     controller.save();

 

 

    PageReference pageRef = New PageReference('/' + result.getKeyPrefix() + '/e');

 

     pageRef.setRedirect(true);

     return pageRef;

 

     }

      static testMethod void testMyController() {

      //Use the PageReference Apex class to instantiate a page

        PageReference pageRef = Page.jobpage;

        //In this case, the Visualforce page named 'jobpage' is the starting point of this test method.

        Test.setCurrentPage(pageRef);

        //Instantiate and construct the controller class. 

       ApexPages.StandardController thecontroller;       

        jobcontroller controller = new jobcontroller(thecontroller);

        controller.setCompanyName('abc');

        //The .getURL will return the page url the Save() method returns.

        String nextPage = controller.mysave().getUrl();

        //Check that the save() method returns the proper URL.

        System.assertEquals('/apex/failure?error=noParam', nextPage);

 

     }

 

     }

 

When I do the runtest, I am getting the following message:

System.NullPointerException: Attempt to de-reference a null object

 

stack trace:

Class.jobcntroller.mysave: line 25, column 25

Class.jobcntroller.testMyController: line 44, column 27 External entry point

 

I am not able to correct the nullpointerexception. Any help on how to resolve this is greatly appreciated.

 

I am lost here.  I have created the trigger in my sandbox and am trying to move it over to production.  The only problem I am having is in the testing.  I am hitting 58% and have no idea why.  The following is what I am getting. Any help would be very much appreciated.....(The only error message that I receive is that it failed)

 

LeadAssignmentTrigger (Code Covered: 58%)

 

 line  executions source
 1   trigger LeadAssignmentTrigger on Lead (before insert)
 2   {
 3 1   List<String> zips = new List<String>();

   
 5   
 6 1   for (Lead lead : Trigger.new)
 7    {
 8 6   if (lead.PostalCode != NULL && lead.Assign_Using_Assignment_Rules__c == true)
 9    {
 10 3   zips.add(lead.PostalCode);
 11    }
 12    }
 13   
 14   
 15 1   Map<String, Zip_Code__c> leadsToUpdate = new Map<String, Zip_Code__c>();
 16   
 17 1   for(Zip_Code__c zip_code:[select Name, Owner.Id from Zip_Code__c where Name in :zips])
 18    {
 19 0   if(zip_code.Name != null) leadsToUpdate.put(zip_code.Name, zip_code);
 20    }
 21   
 22   
 23   
 24 1   if (leadsToUpdate.size() > 0)
 25    {
 26   
 27 0   for (Lead lead : Trigger.new)
 28    {
 29   
 30 0   if (leadsToUpdate.containsKey(lead.PostalCode))
 31    {
 32   
 33 0   lead.OwnerId = leadsToUpdate.get(lead.PostalCode).OwnerId;
 34    }
 35    }
 36   
 37    }
 38 

  }

Im using a custom button in opportunity tab to get INvoice for a particular Opportunity,In that case the Invoice PAge should Invoke only wen the Opportunity Created date should be less than 21 days from now,so if difference between is greater 21 days it should not invoke Here is my COde in Custom button link display type is detail page button if({!Opportunity.CloseDate} - {!Opportunity.CreatedDate} > 21){ window.parent.location.href = "/apex/Invoice_1?id="+'{!Opportunity.Id}'; }else{ //do nothing } Thanks in Advance Sathish

Hi

 

I am getting an error.I know i have to use list for opportunity but the record is not getting saved.Please help me out

 

The related trigger is

 

 

trigger OpportunityCreditCheck on Credit_Check__c (before insert, before update) {

 

 

  for(Credit_Check__c CCheck : Trigger.new){
            
    if(CCheck.RecordtypeId == '012200000009PMEAA2'){
          Opportunity oppr = [Select Account.Business_Type__c,Account.Name,Account.Registered_Charity_Number__c,Product_Name__c, New_Supplier__c, AccountId From Opportunity where Id =:CCheck.Opportunity__c];
     
      if(Oppr.Account.Business_Type__c == 'Limited Company' || Oppr.Account.Business_Type__c == 'Plc' || Oppr.Account.Business_Type__c == 'Charity'){
     
         if(oppr.New_Supplier__c == 'Eon' && oppr.Product_Name__c != 'Bespoke Price'){ 
         
        
         
             if(CCheck.Limited_Company_Account__c == null ){
            CCheck.Limited_Company_Account__c.addError('Please Enter the Account Name');
            }
            if(CCheck.Registered_Address__c == null){
            CCheck.Registered_Address__c.addError('Please Enter the Full Registered Address');
            }
            
            if(CCheck.Date_of_Incorporation__c == null){
            CCheck.Date_of_Incorporation__c.addError('Please Enter the Date of Incorporation');
            }
            
             if(CCheck.Company_Registered_Number__c == null){
            CCheck.Company_Registered_Number__c.addError('Please Enter the Full Company Registered Number');
            }
             
            if(CCheck.Phone_Number__c == null){
            CCheck.Phone_Number__c.addError('Please Enter the Full Phone Number');
            }
            if(CCheck.Billing_Address__c == null){
            CCheck.Billing_Address__c.addError('Please Enter the Full Billing Address');
            }
            }
            
      }
       if(CCheck.Date_of_Incorporation__c < system.Today()-730){
       
           if(CCheck.Full_Company_Name__c == null){
           CCheck.Full_Company_Name__c.addError('Please Enter the Full company name');
           }
             
            if(CCheck.Registered_Address__c == null){
            CCheck.Registered_Address__c.addError('Please Enter the Full Registered Address');
            }
             if(CCheck.Company_Registered_Number__c == null){
            CCheck.Company_Registered_Number__c.addError('Please Enter the Company Registered Number');
            }
             
            if(CCheck.Phone_Number__c == null){
            CCheck.Phone_Number__c.addError('Please Enter the Full Phone Number');
            }
            if(CCheck.Billing_Address__c == null){
            CCheck.Billing_Address__c.addError('Please Enter the Full Billing Address');
            }
            if(CCheck.Director_First_Name__c == null){
            CCheck.Director_First_Name__c.addError('Please Enter the Director First Name');
            }
            if(CCheck.Director_Last_Name__c == null){
            CCheck.Director_Last_Name__c.addError('Please Enter Director Last Name');
            }
             if(CCheck.Directors_DOB__c == null){
            CCheck.Directors_DOB__c.addError('Please Enter Director Date of Birth');
            }
            
            if(CCheck.Building_Name__c == null && CCheck.Building_Number__c == null){
            CCheck.Building_Name__c.addError('Please Enter Building number or Building name');
             CCheck.Building_Number__c.addError('Please Enter Building number or Building name');
            
            }
           
            if(CCheck.Building_PostCode__c == null){
            CCheck.Building_PostCode__c.addError('Please Enter Building Post Code');
            }
            if(CCheck.CC_Consent__c == null){
            CCheck.CC_Consent__c.addError('Please Enter the Full CC Consent');
            }
            if(CCheck.Building_Town__c == null){
            CCheck.Building_Town__c.addError('Please Enter the Town'); 
            }
       }
       
       /*if date of incorporation is greater than 2 years, new supplier is equal to Eon and product name is not equal to bespoke,
        than contact firstname,contact last name,billing building number,billing building name ,billing address,billing town,
        billing post code and date field must be filled.*/
        
          if(CCheck.Date_of_Incorporation__c > system.Today() + 730 && oppr.New_Supplier__c == 'Eon' && oppr.Product_Name__c != 'Bespoke Price'){
           
           if(CCheck.Director_First_Name__c == null){
           CCheck.Director_First_Name__c.addError('Please enter contact First name');
           }
           if(CCheck.Director_Last_Name__c == null){
           CCheck.Director_Last_Name__c.addError('Please enter contact Last name');
           }
            if(CCheck.Building_Name__c == null && CCheck.Building_Number__c == null){
            CCheck.Building_Name__c.addError('Please Enter Building number or Building name');
             CCheck.Building_Number__c.addError('Please Enter Building number or Building name');
            
            }
           if(CCheck.Building_Street_Address__c== null){
           CCheck.Building_Street_Address__c.addError('Please enter Billing Street Address');
           }
           if(CCheck.Building_Town__c== null){
           CCheck.Building_Town__c.addError('Please enter Billing Town');
           }
           if(CCheck.Building_PostCode__c== null){
           CCheck.Building_PostCode__c.addError('Please enter Billing Post Code');
           }
           if(CCheck.Directors_DOB__c== null){
           CCheck.Directors_DOB__c.addError('Please enter Date of Birth');
           }
          }
        }
         if(CCheck.RecordtypeId == '012200000009PMJAA2'){
            
            Opportunity oppr = [Select Account.Business_Type__c,  AccountId From Opportunity where Id =:CCheck.Opportunity__c];
           
          if(Oppr.Account.Business_Type__c == 'Sole Trader' || Oppr.Account.Business_Type__c == 'Trusteeships' ||  Oppr.Account.Business_Type__c == 'Partnership' ){
            
            if(CCheck.Business_Name__c == null){
             CCheck.Business_Name__c.addError('Please enter business name');
            }
            if(CCheck.Bussiness_owner_name__c == null){
                CCheck.Bussiness_owner_name__c.addError('Please enter business owner name');
            }
           if(CCheck.Current_Address_Home_Address__c == null){
            CCheck.Current_Address_Home_Address__c.addError('Please enter current address');
           }
           if(CCheck.Date_of_Occupancy_of_Home__c == null){
            CCheck.Date_of_Occupancy_of_Home__c.addError('Please enter date of occupancy at Home');
           }
           if(CCheck.Previous_Address__c == null){
            CCheck.Previous_Address__c.addError('Please enter previous address if it less than 2 years Or mention SAME AS ABOVE');
           }
           if(CCheck.Bussiness_Owner_DOB__c == null){
           CCheck.Bussiness_Owner_DOB__c.addError('Please enter Bussiness owner date of birth');  
           }
           
          }
        }
    }   
    }

Thanks

 

Nasir

I have created a Custom Button in Opportunity tab called Invoice,and wen Click the custom Button It has to generate a Invoice for a particular Opportunity ID in a apex Page, Using Condition Only when Opportunity Name Equal to 'Testing' if not it has to be null.I have tried Several times using IF Control Statement,but im getting a error of URL NO LONGER EXIST, Here is my CUstom Button Code {!IF( Opportunity.Name = 'Testing' , '/apex/Invoice_1?id='&Opportunity.Id , null)} but its working fine wen the code is like below /apex/Invoice_1?id={!Opportunity.Id} Kindly Suggest me a Example for how to use IF statemnts in Calling URL Thanks in advance Sathish

Hey all,

 

So right now I am having an issue with a popup opened by javascript not closing itself. I am executing the self.close() javascript on the "save" button in the window, but the window simply refreshes itself rather than closing. Does anyone know if visualforce is stopping the close() action, and if so, is there a known workaround to close the popup?

 

Thanks,

Derrek