• Big V
  • NEWBIE
  • 55 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 26
    Replies

HI

 I am getting this Error: Compile Error: Method does not exist or incorrect signature: [checkboxex123].setacctypes() at line 29 column 9

 

public class checkboxex123{
    public list<string> acctypes=new list<string>();
    boolean disable=true;
    public list<selectoption> getitems(){
    list<SelectOption> options=new list<SelectOption>();
    //options.add(new SelectOption('Demat','Demat'));
    //options.add(new SelectOption('savings','savings'));
    return options;
    }
    
   public void setacctypes( list<string> acctypes){
  this.acctypes=acctypes;
    }
    public list<string> getacctypes(){
    return acctypes;
    }
    public PageReference test() {
        return null;
    }
    
    private static testmethod void testclass()
    {
        checkboxex123 con=new checkboxex123();
        con.getacctypes();
        con.test();
        con.getitems();
       
        con.setacctypes( );
       
    }

     
}

  • February 01, 2013
  • Like
  • 0

Hi

 

When I schedule batch apex I get an error while executing the batch at the scheduled time.

The debug log says as "Internal Salesforce Error".

and later I received an email describing the error as: Access to entity 'IDEPerspective' denied

Does anyone what exactly does that mean..Any direction in solving this issue would be helpful.

 

 

Big V

  • January 08, 2013
  • Like
  • 0

Is there any good Css stylesheets for displaying Related List in Visual force pages for Mobiles

  • January 31, 2012
  • Like
  • 0

HI

 I am getting this Error: Compile Error: Method does not exist or incorrect signature: [checkboxex123].setacctypes() at line 29 column 9

 

public class checkboxex123{
    public list<string> acctypes=new list<string>();
    boolean disable=true;
    public list<selectoption> getitems(){
    list<SelectOption> options=new list<SelectOption>();
    //options.add(new SelectOption('Demat','Demat'));
    //options.add(new SelectOption('savings','savings'));
    return options;
    }
    
   public void setacctypes( list<string> acctypes){
  this.acctypes=acctypes;
    }
    public list<string> getacctypes(){
    return acctypes;
    }
    public PageReference test() {
        return null;
    }
    
    private static testmethod void testclass()
    {
        checkboxex123 con=new checkboxex123();
        con.getacctypes();
        con.test();
        con.getitems();
       
        con.setacctypes( );
       
    }

     
}

  • February 01, 2013
  • Like
  • 0

Hi,

 

I am using below code to display a Long Text Area field. It is working fine in IE but not in Chrome or Firefox.

whenevr the field has long URL it is not able to break the url in multiple lines.

<apex:outputField style="display:inline;" value="{!ABC.xyz__c}" />

 

i can't use outputText as it will show URL as text and not as link.

 

Suggest some way that work in every browser.

 

I have a visualforce page in which I have embedded bunch of visualforce pages as iframes for tab styled view. I have button for some calcuations inside the frame using java script. everything worked fine in Chrome but it is not working in firefox and in IE 9 which I click on tab it is not even showing any thing. I have checked in developer console. In chrome all the logs are created as expected. In firefox I can see log till the button is pressed but actionfunction is never invoked. In IE I don't see any log. 

I am building a custom search VF page. I have an inputText area where user enters search term. When they hit enter I wan't to pass that value to URL so it looks like /apex/PageName?s=ValueEntered

 

This is what I have so far which isn't working. Any guidance?

 

  <body id="bodyPortalCaseSearch">
   <apex:form id="frmPortalCaseSearch">
    <apex:pageBlock id="pbPortalCaseSearch">

     <div class="table">
      <div class="tableRow">       
       <div id="searchDiv" class="tableCell">
         <apex:inputText id="searchinput" style="width:85%; height:25px;margin:0; padding: 0px 6px 0px;"           title="Portal_Search_Phrase" value="{!portalSearchModel.searchTerm}" onkeypress="insertSearchParam()"/>
         <apex:commandLink id="goSearch" title="Search"  style="text-decoration:none;" rerender="asQuestions,asAnswers,asSolutions,asIdeas,asCases,asContent">Search
         </apex:commandLink>
<script type="text/javascript"> function insertSearchParam(){ var val = document.getElementById("{!$Component.searchinput}").value; document.location.search = "?s=" + val; searches(); } document.getElementById("{!$Component.searchinput}").onkeypress = function(e){ if (!e) e = window.event; // resolve event instance if (e.keyCode == '13'){ insertSearchParam(); return false; } } </script>

 

Hi,

 

We are using SFDC's web-to-case and email-to-case options to get updated Case and Contacts records. This is working fine in Sandbox, but in production Case record is created and Contact record is not created when web-to-case scenario.

 

In Email-to-case scenario both Case and Contacts are getting created if not the having the same contact  in Contact object. But web-to-case scenario only Case records is creating and Contact records is not getting created.

 

Could you please help me whether I need to enable something here.

 

Thanks in Advace,

 

VKumar.

Hi

 

When I schedule batch apex I get an error while executing the batch at the scheduled time.

The debug log says as "Internal Salesforce Error".

and later I received an email describing the error as: Access to entity 'IDEPerspective' denied

Does anyone what exactly does that mean..Any direction in solving this issue would be helpful.

 

 

Big V

  • January 08, 2013
  • Like
  • 0

Hi guys, am stuck here, can someone help me please;

 

I have 2 selectList, one for unassigned processes and another for assigned processes;

so far i can move processes from unassigned to assigned and also am able to re-order them using jquery .

 

This is my code;

 

******************************  vf page*********************************

 

 

<apex:panelGrid columns="3" id="ad1">
                <apex:panelGroup >
                <u> <apex:outputText style="font-size:16px;" value="Unassigned Processes" /></u><br/><br/>
                   <select multiple="false" id="select1" style="width:350px" size="10">
                     <apex:repeat value="{!Ovalues}" var="Opt" >
                         <option value="{!Opt}"> {!Opt}</option>
                      </apex:repeat>  
                    </select><br/>
                     <input type = "image" src="{!$Resource.up}" style="width:30px;height:20" id ="up" />
                     <input type = "image" src="{!$Resource.down}" style="width:30px;height:20" id ="down" />
                </apex:panelGroup>
                <apex:panelGroup >
                    <br/><br/><br/><br/><br/>
                    <input type = "image" src="{!$Resource.right}" style="width:30px;height:20" id ="left" />
                        
                    <br/>
                    <br/>
                    <input type = "image" src="{!$Resource.left}" style="width:30px;height:20" id ="right" />
                </apex:panelGroup>
                <apex:panelGroup >
                 <u><apex:outputText style="font-size:16px;" value="Assigned Processes" /></u><br/><br/>
                   <select multiple="true" id="select2" style="width:350px" size="10">
                     <apex:repeat value="{!assigned}" var="Opt" >
                         <option value="{!Opt}"> {!Opt}</option>
                      </apex:repeat>  
                    </select><br/>
                   <input type = "image" src="{!$Resource.up}" style="width:30px; height:20" id ="rup" />
                   <input type = "image" src="{!$Resource.down}" style="width:30px; height:20" id ="rdown" />
                   <br/><br/><br/><br/>
                   <apex:commandButton value="Save" action="{!save}"/>
                    <apex:commandButton value="Cancel"/>
                </apex:panelGroup>
            
        </apex:panelGrid>

 

 

********************************* controller*********************************************

 

 

public class ProcessController {

 
     Set<String> originalvalues = new Set<String>{'Include Unsubscribe',
                                                  'Authority to Represent',
                                                  'NDA Needed',
                                                  'References needed',
                                                  'P33 Interview',
                                                  'Submit CV to Client',
                                                  'Client Interview',
                                                  'Optain Offer'};
                                                  

 
   public Set<String> assigned {get;set;}
   

                                                  
   public Set<String> getOvalues(){
    
    return originalvalues;
   
    }
    
    
    
    public ProcessController(){
        String id = ApexPages.currentPage().getParameters().get('id');
            if(id !=''){
            JobApplicant_ATS__c applicant = [Select Applicant_Name__c From JobApplicant_ATS__c where id=:id];
            
            ApplicantName = applicant.Applicant_Name__c;
            List<ApplicantAssignedProcess__c> asspro = [Select Process__c,Level__c,ApplicantId__c From
                                                        ApplicantAssignedProcess__c Where ApplicantId__c=:id Order By Level__c];
            
            assigned = new Set<String>();
            if(asspro.size()!=0){
            
                for(ApplicantAssignedProcess__c asp:asspro){
                
                    assigned.add(asp.Process__c);
                
                
                }
            
            }
          }   
      }
      
      
  }

 

  • September 13, 2012
  • Like
  • 0

Hi there,

 

I have an inputText field and a button as follows:

 

<apex:inputText onkeyup="enableDisableGoButton(event);" onkeypress="searchTextEnterPostBack(event);" value="{!searchstring}" id="theSearchstring" maxlength="100" size="50" /> &nbsp;
                                <apex:commandButton value="Go" id="submitButton" styleClass="goButtonDisabled" reRender="theSearchResults" />

 

Here are the Java Script Functions:

 

function enableDisableGoButton(event) {
            var seachInputText = document.getElementById("{!$Component.theSearchstring}");
            var goButton = document.getElementById("{!$Component.submitButton}");
            if(seachInputText.value.length < 2) {
                goButton.className = "goButtonDisabled";
            }
            else {
                goButton.className = "goButtonEnabled";
            }        
        }    
        
        function searchTextEnterPostBack(event) {
            
            var keynum = 0;
        
            if (window.event) {
                keynum = window.event.keyCode;
            }
            else if (e.which) {
                keynum = e.which;
            }
        
            if (keynum == 13) {
                if(seachInputText.value.length < 2) {
                    return null;
                }
                else {
                    return true;
                }
            }
        }

 

So far I have the Go button hide when there is less than two characters on the inputText. That works fine. But when the user clicks enter it does a post back. I want to check if the user pressed enter and if the inputText has less than 2 characters then I don't want the post back to happen if it has atleast 2 characters then the post back should happen as normal. 

 

I am using what is in the inputText as the keyword for <knowledge:articleList>.

 

Please help. Thanks.

 

 

Hello! I am looking through the forums and can only find questions about using URLFOR and the "new" action on a custom object. But what about using "edit" or "delete"? For example, I would like to do the following:

<Apex:commandLink action="{!URLFOR($Action.someObject__c.delete, objectID)}" value="Delete" />

 or exchange "delete" for "edit". But whenever I do this, I get the error:

"Visualforce Error


Invalid parameter for function URLFOR"

 

Is there any solution or explanation? Thank you in advance :)

  • September 06, 2012
  • Like
  • 0

Hi,

 

I created a test class for a custom controller for a VF page off a custom object called Client_Status_Dashboard__c.  As part of my object, I have a trigger called TotalUpdate which updates a number field in the custom object by summing a few other formula fields.  When I run my test class with the trigger de-activated, I get 100% coverage.  However, when I re-activate the trigger, as it is needed for the final product, I get the error below:

 

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, TotalUpdate: execution of BeforeInsert caused by: System.NullPointerException: Argument 1 cannot be null External entry point: []

 

 

My Test Class is as follows:

 

@Istest(SeeAllData=true)
public class TestScorecardController {

public static testMethod void testMyController() {    
        
  Account acct= new Account();
  acct.name='test';
  acct.Type='Employer';
  insert acct;
 
  Client_Status_Scorecard__c cssc = new Client_Status_Scorecard__c();
      cssc.Client_Name__c = acct.id;
      cssc.Client_Licenses__c = 'Portal';
      cssc.Satisfaction_Survery_Score__c = 'A Score of 4-5';
      cssc.Projected_Current_Year_Revenue__c = 'Projected Increase';
      cssc.Engagement_Index_Score__c = 'A Score of 60+';
      cssc.Senior_Level_Relationship__c = 'Positive, Influential';
      cssc.Health_Index_Score__c = 'A Score of 60+';
      cssc.Impact_Index_Score__c = 'A Score of 60+';
     
 
  ApexPages.StandardController sc = new ApexPages.standardController(acct);
  ScorecardController scoreCardCont = new ScorecardController(sc);
  scoreCardCont.score.add(cssc);
   scoreCardCont.save();
 
 }
}

 

And my Trigger is as follows:

 

Trigger TotalUpdate on Client_Status_Scorecard__c (before insert,before update) {

    for (Client_Status_Scorecard__c css1 : Trigger.new) {

    IF((css1.Health_Index_Score__c == null ||

          css1.Health_Index_Score__c == 'Value Index Not Yet Complete or Standalone Client') &&
        (css1.Impact_Index_Score__c == null ||

          css1.Impact_Index_Score__c == 'Value Index Not Yet Complete or Standalone Client'))
     {
        css1.Total_Score_Numerator__c = css1.Satisfaction_Revenue__c + css1.Utilization_Engagement_Score__c + 

                  css1.Relationship_Profile_Score__c;
        css1.Total_Score_Denominator__c = 9.0;
      }

 

    ELSE {
   
        css1.Total_Score_Numerator__c = css1.Satisfaction_Revenue__c + css1.Utilization_Engagement_Score__c +

                  css1.Relationship_Profile_Score__c + css1.Behavior_Change_ROI_Score__c;
        css1.Total_Score_Denominator__c = 12.0;
         
        }
    }
}

 

From what I can gather, the eror is being thrown because the fields that are being summed in the trigger are formula fields that do not have values until after the record is saved so they are null.  However, I'm not sure how to fix that.  Can anyone help?  Thanks,

  • September 06, 2012
  • Like
  • 0

Hi,

 

How can I display an attachment on Visualforce page that can be downloadable.

 

 

Thanks in advance!

  • September 05, 2012
  • Like
  • 0

Hey folks, I'm in a new role now, so I will be coding a lot more.  Looking forward to hanging out in here more often!

 

I'm working with Dynamic Visualforce at the moment (apex:dynamicComponent) to build a simple Lead form.  It's a long story why it has to be built dyamically.  I'm extending the standard Lead controller, and leveraging the standard {!save} method.  It works great when the record saves... they are brought to the new record and all the info they entered is there... woohoo!

 

The problem is when they click save but haven't filled in one or more required fields.  The form refreshes and correctly identifies the fields they forgot to populate and notifies them as is appropriate.  BUT, all the info they had entered is cleared out!

 

Here is a small example that shows what I mean:

 

Visualforce Page:

<apex:page extensions="dynamicTestController" standardController="Lead">

    <apex:messages />

    <apex:form >
        <apex:pageBlock mode="edit">

            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            
            <apex:dynamicComponent componentValue="{!mySection}"/>
            
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

Apex Controller:

public with sharing class dynamicTestController {

    public Lead theLead {get;set;}

    public dynamicTestController(ApexPages.StandardController controller) {
        theLead = (lead)controller.getRecord();
    }

    public Component.Apex.PageBlockSection getMySection() {
        
        Component.Apex.PageBlockSection section = new Component.Apex.PageBlockSection(columns=1);
        
        Component.Apex.InputField field1 = new Component.Apex.InputField();
        field1.expressions.value = '{!theLead.LastName}';
        
        Component.Apex.InputField field2 = new Component.Apex.InputField();
        field2.expressions.value = '{!theLead.Company}';
        
        Component.Apex.InputField field3 = new Component.Apex.InputField();
        field3.expressions.value = '{!theLead.Phone}';
        
        section.childComponents.add(field1);
        section.childComponents.add(field2);
        section.childComponents.add(field3);
        
        return section;
    }
}

 

 

 

You can see that when you populate LastName and Phone, but NOT Company and click save the form is cleared out... not cool!

 

I've concocted a workaround, which is to use a custom save method that returns nothing so I can avoid refreshing of the form.  I then use the apex:messages component to display any errors at the top of the page and redirect with JavaScript if there are no errors.  It works, but then errors that should be on a specific field are at the top instead and I would rather not have to rely on JS for navigation like that.

 

Any thoughts?

 

Cheers,

michaelforce

I have a requirement where multiple records needs to be created.

 

I want to use this under opportunity line items. like when a user clicks on a custom button it should open a page where it will ask for product name, quantity, price, from date and to date. once user enter all the information it should create N number of records based on the dates provided

 

For example if user enters From Date - 1/1/2012  and to Date - 5/1/2012, 5 records have to be created.

 

Thanks,

Hi,

    I am writing a search query that returns results in a list format. Name of entry is a type of output link that redirects user to detail page of that entry, when clicked upon. Now there is one field called Flag__c (default value==' false') . On first time click of this output link I want to toggle the value from false to True and next time onwards I want to keep it as it is ( i.e value should change only once , next time onwards change should not happen).

       How can this be done? Shall I continue to use apex:outputlink or shall I switch to apex:commandlink?

Hello,

 

I created this very simple VS page and supporting cotroller to send out an email upon page load. The send() function executes fine, but the recepient does not get the email.  I've succesfully run the Email Deliverability Tool and checked corporate mail filter without success.  I must be missing something very obvious here.

 

Thanks,

Raf 

 

 

<apex:page controller="sendEmailController">
  <apex:outputText value="{!errorMessage}"/>

</apex:page>


public class sendEmailController {

    public String errorMessage {get; set;}

    public sendEmailController(){
           send();
    }
    
    public PageReference send(){

        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
        email.setSubject('Test email from Salesforce');
        String[] toAddresses = new String[] {'username@company.com'};
        email.setToAddresses(toAddresses);
        email.setPlainTextBody('sent from quoteSendToCop');
        
        Messaging.SendEmailResult [] r = 
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});   
        
        if (!r.get(0).isSuccess()) {
            System.StatusCode statusCode = r.get(0).getErrors()[0].getStatusCode();
            errorMessage = r.get(0).getErrors()[0].getMessage();
        } else {errorMessage = 'success';}
            
        return null;
    }
}

 

 

  • February 13, 2012
  • Like
  • 0

Hi

I want to display some links on extreme right at top of my vf page as images .

 

Can anybody tell me how to display links as any image.

 

thanks

Ritika

Hey,

I made a pickList in User object and want to add data dynamically but I cannot do it via controller because it is a Standard Page and I dont have access to controller as per my knowledge..
Is there is any way to add options dynamically through another controller like we can get options through Schema

 

public List<SelectOption> getName()
    {
    List<SelectOption> options = new List<SelectOption>();
    Schema.DescribeFieldResult fieldResult = User.Organization__c.getDescribe();
    List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
    for( Schema.PicklistEntry f : ple)
    {
    	options.add(new SelectOption(f.getLabel(), f.getValue()));
    }       
    return options;
}

 

 Is there is any way to put values to that schema...??
thanks 



i created visual force page ,in that i need background image in css file .it does not invoke .please help me .

Hello All,

 

I have a Visualforce Page which  when viewed as an Admin works fine, the page has a rerender portion when on selecting a value from a drop down a couple of text boxes get rerendered.

 

I logged in as a different user and the page shows up fine, when i change the drop down the rerender gets called and i end up getting the message

 

"Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. "

 

The VF page, the apex class, the extension class, the objects used (have C R E D), all have the permissions for this profile. Also, all fields of the associated objects are visible to this profile.

 

With this error message i am unable to get any clue of what is happening actually, it's just supposed to rerender a few text boxes which are not associated with any access privileages.

 

Moreover, the debug log says "SUCCESS" and all getter and setter methods are called fine. Its only when the page refreshes itself that something goes wrong somewhere.

 

Please let me know your thoughts.

 

Thanks,

Edwin