• 4 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 1
  • 7
I have developed a search page that would fetch results according to the values selected by the user.The results should be displayed upon clicking the Search button.But this button doesn't seem to be working as expected. Below is the apex controller and vf page for the same.

Controller : 
public without sharing class BadgeControllerExtension
    private String soql {get;set;}
    // the collection of badges to display
    public List<Event_Attendee_Badge__c> badges {get;set;}
    public List<Event_Attendee_Badge__c> lstEvents= new List<Event_Attendee_Badge__c>();
    public List<Event__c> lstEvt = new List<Event__c>();
    public List<Attendee__c> lstAtt = new List<Attendee__c>();
    public Set<ID> evtIds = new Set<ID>();
    public String evtName;
    public String selectLocation{get;set;}
    /*public BadgesController(){
            selectLocation = '';
    public String Event{get;set;}
    public String Location{get;set;}
    public String Attendee{get;set;}
    public List<Event__c> lstEventBadge{get;set;}
  public List<SelectOption> getEventsList()
        lstEvents = [Select Event__c,Date__c,Location__c From Event_Attendee_Badge__c];
        List<SelectOption> eventBadgeList = new List<SelectOption>();
        eventBadgeList.add(new SelectOption( ' ' ,'---Select---'));
        for(Event_Attendee_Badge__c evt : lstEvents)
        lstEvt = [Select Name From Event__c where ID IN:evtIds];
        for(Event__c evt1 : lstEvt)
            eventBadgeList.add(new SelectOption(evt1.Name, evt1.Name));
        return eventBadgeList;
    public List<SelectOption> getLocationsList()
        lstEvents = [Select Event__c,Date__c,Location__c From Event_Attendee_Badge__c];
        List<SelectOption> eventBadgeList = new List<SelectOption>();
        eventBadgeList.add(new SelectOption( ' ' ,'---Select---'));
        for(Event_Attendee_Badge__c evt : lstEvents)
            eventBadgeList.add(new SelectOption(evt.Location__c, evt.Location__c));
        return eventBadgeList;
    public List<SelectOption> getAttendeesList()
        lstEvents = [Select Event__c,Date__c,Location__c,Attendee__c From Event_Attendee_Badge__c];
        List<SelectOption> eventBadgeList = new List<SelectOption>();
        eventBadgeList.add(new SelectOption( ' ' ,'---Select---'));
        for(Event_Attendee_Badge__c evt : lstEvents)
        lstAtt = [Select Name From Attendee__c where ID IN:evtIds];
        for(Attendee__c att : lstAtt)
            eventBadgeList.add(new SelectOption(att.Name, att.Name));
        return eventBadgeList;
    public void echoVal()
        Event =  Apexpages.currentPage().getParameters().get('firstParam');
        System.debug('Event Name ='+Event);
        Location = Apexpages.currentPage().getParameters().get('secondParam');
        System.debug('Location Name ='+Location);
        Attendee = Apexpages.currentPage().getParameters().get('thirdParam');
        System.debug('Attendee Name ='+Attendee );

    // runs the search with parameters passed via Javascript
    public void runSearch() {
	String searchEvent = system.label.Percentage_Value +Event+ system.label.Percentage_Value;
    String searchLocation =  system.label.Percentage_Value +Location+ system.label.Percentage_Value;
    String searchAttendee = system.label.Percentage_Value +Attendee+ system.label.Percentage_Value; 
    lstEventBadge =[select Name,Date__c,Location__c From Event__c where Name LIKE : searchEvent];
    System.debug('List is='+lstEventBadge);    
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Error,system.label.SearchPage_ErrorMessage));

<apex:page controller="BadgeControllerExtension" >
    <apex:form >
        <apex:pageBlock title="{!$Label.AccountsView}" id="PageBlock">
            <apex:pageBlockButtons >
                <apex:commandButton value="Search" onclick="callActionMethod()" action="{!runSearch}" status="showStatus" reRender="tablePageBlocksectionSFDC" id="sfdcLookup" tabindex="8"/>
            <apex:pageBlockSection columns="2" title="Choose Event" id="theEventPageBlockSection" collapsible="false" >
                <apex:outputLabel value="Event" />
                    <apex:outputPanel layout="block" id="Event" styleClass="requiredInput">
                        <div class="requiredBlock"></div>-
                    <apex:selectList size="1">
                        <apex:selectOptions value="{!EventsList}" id="ev"></apex:selectOptions>
            <apex:pageBlockSection columns="2" title="Choose Location" id="theLocationPageBlockSection" collapsible="false" >
                <apex:outputLabel value="Location" />
                    <apex:outputPanel layout="block" id="Location" styleClass="requiredInput">
                        <div class="requiredBlock"></div>-
                    <apex:selectList size="1">
                        <apex:selectOptions value="{!LocationsList}" id="lo"></apex:selectOptions>
            <apex:pageBlockSection columns="2" title="Choose Attendee" id="thePageBlockSection" collapsible="false" >
                <apex:outputLabel value="Attendee" />
                    <apex:outputPanel layout="block" id="Attendee" styleClass="requiredInput">
                        <div class="requiredBlock"></div>-
                    <apex:selectList size="1">
                        <apex:selectOptions value="{!AttendeesList}" id="att"></apex:selectOptions>
            <!--<span class="pointer" onclick="callActionMethod()"> Click </span>-->
            <apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel" status="myStatus">
                <apex:param name="firstParam"  value="" />
                    <apex:param name="secondParam"  value="" />
                            <apex:param name="thirdParam"  value="" />
            <script type="text/javascript">
            function callActionMethod()
                var evtVal = document.getElementById("{!$Component.frm.ev}").value;
                var locVal = document.getElementById("{!$Component.frm.lo}").value;
                var attVal = document.getElementById("{!$Component.frm.att}").value; 
                /*Below Method is generated by "apex:actionFunction" which will call Apex Method "echoVal" */
            <apex:pageBlockSection collapsible="false" title="Following Badges found!" id="tablePageBlocksectionSFDC" columns="1" rendered="{!IF(AND(NOT(ISBLANK(lstEventBadge)),lstEventBadge.size>0),'Yes','No')}">
                <apex:pageBlockTable value="{!lstEventBadge}" var="recVar"  columnsWidth="3%,18%,10%,10%,10%" rendered="{!if(lstEventBadge.size <> null,true,false)}">                       
                    <apex:column headerValue="Event Name">
                        <apex:outputlink value="#" onclick="window.open('/{!recVar.Id}','_blank');">{!recVar.Name}</apex:outputlink>
                        <apex:column value="{!recVar.Date__c}" headerValue="Event Date" />
                            <apex:column value="{!recVar.Location__c}" headerValue="Event Location" />
 Any help/suggestions would be greatly appreciated.

Thanks for your time and support
I continue to get this error in the "Build an App Home Lightning Page" Module even though I have tested the My Data Lightning App on both my mobile device and my desktop.  I've even changed the App Name to MyData (without a space) and I still get the error message.  What am I doing wrong?


 below are the code

public static final string PICKLIST_SELECT = 'Select';




 how to convert PICKLIST_SELECT in id


Hi ,

  I developed a visualforce page with date field. when i opened this page the date picker popup opened default from date field. i need to just hide this popup if i click that textbox need only open this popup..Have you any solution for this.





List<Group> leadQueueRec = [Select Id, Name from Group where Name = 'LeadQueue'];
List<Lead>    leadRec = [Select Id, Name, OwnerId from Lead where Name='James'];
if(leadRec.size() > 0){
    leadrec[0].OwnerId = leadQueueRec[0].Id;
    update leadrec[0];


Above snippet of code I am able to run throgh System Log successfully.

But when I am writing same code in one actionFuction It is giving the Exception

DML currently not allowed
System.Exception: DML currently not allowed


So I am not getting the reason for this? Does anybody come across same error and knows what is the solution to handle this?


I'm very new at this so bear with me.

I'm creating a Visualforce page that shows data in a table.  Not in the traditional apex:table sense, but rather one field per cell.

How do I get just the value in the cell?  I don't want the field label (apex:outputfield isn't working).  I've tried the cheat sheet and the component library and nothing looks like it'll get me what I need.  What am I missing?



So our Prospect want to implement Tokenized Sending Features because they don't want to store data in SFMC before sending Email/SMS and want to use REST API to push data into SFMC but again they want to use journey builder activities, new tokens creation and other data filter and segmentation/query features etc but my concern after looking at below unsupported features on SFMC documentation is, How to to resolve following listed limitation ? is there any solution to this ? can we still use journey builder if we enable tokenized sending? 
Unsupported Tokenized Sending Features:
Tokenized Sending does not work with certain Marketing Cloud features. Review this list for additional information.
MobilePush, GroupConnect, or Marketing Cloud Connect
MobileConnect QueueMO SMS API
Other data privacy features, such as field-level data encryption or data obfuscation
Journey Builder activities when not storing decision criteria in a clear state or in Marketing Cloud
Segmenting, filtering, or querying when not storing criteria in a clear state or in Marketing Cloud
Execution of Service Level Agreements (SLAs) specifically for sending due to the inclusion of outside servers within the process
New token creation from a clear email address or mobile number. For every use case, create a token.
List Source: https://help.salesforce.com/articleView?id=mc_overview_unsupported_tokenized_sending_features1.htm&type=5
Any suggestions, approaches or solutions would be appreciated.
Thanks a lot in advance. 

Hi All,

I have created a package using my developer org and now I want to upload it in AppExchange. I don't have any partner license.

Please guide me how can I do the same.  

Hi All


I am getting this error when i write the ontabenter function on the tab.

<apex:tab label="Billing" name="billName" id="tabBilling" ontabenter="callCon('Billing');" style="background-color:white;"  rendered="{!IF(strSearchlevel='1',false,true)}">

<apex:outputText value="{!IF(lstDisputeInfo.size>0,'Yes','No')}" label="Account In Dispute" />

 <apex:actionFunction name="callCon" oncomplete="callCon1();">
                        <apex:param name="firstParam" value="" assignTo="{!Tabselected}"/>


Below is the error. when i remove the ontabenter action it is not throwing the error, but i need to write the ontabenter action in order to capture the clicks on the tab. Please let me know your taughts on this.Appreciate your time and help.


The value 'null' is not valid for operator '>'

Error is in expression '{!IF(lstDisputeInfo.size>0,'Yes','No')}' in component <apex:outputText> in page summarypage