• SVsfdc
  • NEWBIE
  • 45 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 12
    Replies
I have a visualforce page with a custom controller to display a custom table of cases. I want to add a link for any given case listed for a user to accept the case. Can I use the $Action.Case.Accept function to achieve this? 

When I load the page I get the following error: 
"The value of the "ids" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information."



Page:
<apex:page controller="casePollList" >
	<div style="width:70%;">
	<div style = "width= 100%; text-align: center; font-size: 20px;">
		Academic Advising Queue
	</div>
        <apex:form >
            <apex:pageBlock id="myBlock" >
                <apex:actionPoller interval="10" rerender="myBlock" />
                <apex:pageBlockTable value="{!cases}" var="c" id="myTable">
                    <apex:column title="Link">
                        <apex:facet name="header">Case Number</apex:facet><apex:outputLink value="/{!c.id}" >{!c.CaseNumber}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!c.IOC_flag__c}"/>
                    <apex:column value="{!c.CaseNumber}"/>
                    <apex:column value="{!c.Subject}"/>
                    <apex:column title="Name"><apex:facet name="header">Name</apex:facet><apex:outputText >{!IF(c.contact.name != null, c.contact.name, c.suppliedname)}</apex:outputText></apex:column>
                    <apex:column value="{!c.Total_minutes_in_the_queue__c}"/>
                    <apex:column value="{!c.Type}"/>
                    <apex:column value="{!c.CreatedDate}"/>
                    <apex:column>
                        <apex:facet name="header">Owner</apex:facet>
                        <apex:outputText label="Owner" escape="false">{!c.Owner.Name}</apex:outputText>
                        <apex:outputLink value="{!URLFOR($Action.Case.Accept,c.id)}">Accept Case</apex:outputLink>
                    </apex:column>
            </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:form>
	</div>
</apex:page>


Controller: 
public class casePollList {
   public ApexPages.StandardSetController setCon {
      get {
         setCon = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT 
                                                                                id, 
                                                                                Subject, 
                                                                                CaseNumber, 
                                                                                Contact.Name, 
                                                                                Owner.Name, 
                                                                                Total_minutes_in_the_queue__c, 
                                                                                suppliedName, 
                                                                                Type,
                                                                                CreatedDate
                                                                                FROM Case WHERE owner.name='Academic Advising Requests Queue' order by CreatedDate Asc]));
         return setCon;
      }
      set;
   }
   // Initialize setCon and return a list of records
   public List<Case> getCases() {
      return (List<Case>) setCon.getRecords();
   }
}

 
SF->Setup->Intergrations->API->Enterprise WSDL 
why standard objects wont show-up? any setting to showup standard objects?
  • October 30, 2019
  • Like
  • 0
Is it possible to pass values(Bindings) from Einstein Analytics to Visualforce Page?
Please share any link or steps to do that. 
Thank you all
  • August 28, 2018
  • Like
  • 0
Please help me on SOQL query using Like operator for Checklist Type in SF.
SELECT Order_Type__c,Part_number__c FROM Product where Order_Type__c 'Purchase%'

The below values are for Order_type__c field.
Annual Lease;Purchase;Short Term Lease
Fee
Lease
Lease;Purchase
Lease;Purchase;Short Term Lease
 
  • August 21, 2017
  • Like
  • 0
Hi There,
I see the below code in some apex examples. What's mean by {get;set;} here? please share some info or any links.
public Account acct {get;set;}
  • August 11, 2017
  • Like
  • 0
Here's what I'm trying to do. I work for a small nonprofit and I want to create a button that auto-generates a pdf thank you message for staff to print out and mail. Easy enough. I also want staff to be able to update and edit the text of that thank you, without having to learn to code, using pre-defined code pieces in their document. For instance, I want them to be able to write "Thank you for your {!Opportunity.Amount} gift..." and have it show up as "Thank you for your $50 gift..."

Here's my process so far: I put a long text/field on the campaign object where staff person can paste the letter text. Then in Visualforce, I call up this text field and display it. So far so good, kinda. 

My issue is that in the text of the Visualforce page it still says "Thank you for your {!Opportunity.Amount} gift...". If I use <apex:outputField ... /> instead it does the samething. It isn't displaying the information from the opportunity. If I put {!Opportunity.Amount} directly in my visualforce page it works just fine.

Here's the code for that section. Changing the escape doesn't help. 
<apex:outputText escape="false" value="{!Opportunity.Campaign.Ack_Letter_Text__c}"/>





Two questions:
  1. How can I put field values or apex code into a text field, and have it display properly when called in a Visualforce page?
  2. If the answer to 1 is no, then can you suggest a workaround that would make it easy for non-dev staff to update or create new letter copy?
I need to save records from visualforce page.My requirement is I need to get related objects dynamically based on any parent record id.So I created 1 Vf component and controller for that where I am getting related object and fields which can be displayed on vf page but i need to edit and save some record.How to achieve that.Please help me with this. Here is the code I have tried:
VF component

<apex:component controller="CustomRelatedListControllerNew" allowDML="true" >
    <apex:attribute assignTo="{!typeOf}" name="typeOfParam" required="true" type="String" description="Type of Related Record" />
    <apex:attribute assignTo="{!fieldlist}" name="relatedFieldlistParam" required="true" type="String[]" description="String of related Fields." />
    <apex:attribute assignTo="{!relatedField}" name="relatedFieldParam" required="true" type="String" description="String of related field." />   
    <apex:attribute assignTo="{!relatedId}" name="relatedIdParam" required="true" type="String" description="String of related Id." />
    <!---<apex:attribute assignTo="{!obj}" name="relatedIdobject" required="true" type="sObject[]" description="String of related objects." />-->

    <apex:form >
    <apex:pageblock title="{!typeOf}" id="childobj">
    <apex:commandButton value="Save" action="{!Save}" reRender="childobj"/> 
    <apex:pageBlockTable var="o" value="{!objects}">

      <apex:repeat value="{!fieldlist}" var="fldNames">
       <apex:column > 

                <apex:outputText value="{!$ObjectType[typeOf].fields[fldNames].Name}">

                </apex:outputText>

        </apex:column>
        <br></br>
        <apex:column >
        <apex:inputField value="{!o[fldNames]}">
        <!---<apex:inlineEditSupport showOnEdit="saveButton,cancelButton"
                        hideOnEdit="editButton" event="ondblclick"
                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>-->
                        </apex:inputField> 
        </apex:column>
        <br/>
          </apex:repeat>



    </apex:pageBlockTable>

    </apex:pageblock>

    </apex:form>
</apex:component>

Controller:
public class CustomRelatedListControllerNew {
    private ApexPages.StandardController controller {get; set;}
    public String typeOf { get; set; }  
    public String relatedField { get; set; }
    public List<String> fieldlist{ get; set; }
    public Id relatedId { get; set; }
    public List<sObject> obj{ get; set; }
    public String query;
    public Integer n;
    public List<sObject> objects;

   public List<sObject> getObjects() {
        n = fieldlist.size();
        System.debug(n);
        //String d = ApexPages.currentPage().getParameters().get('id');
        //System.debug(d);
        query = fieldlist.get(0);
        //String query1 = 'SELECT Id'+ ' ' + 'FROM'+ ' ' + 'Attachment';
        for(Integer i=1;i<fieldlist.size();i++){
            query = query+ ' , ' + fieldlist.get(i) ;
            System.debug(query);
        }

        System.debug('qqq****'+'SELECT'+ ' '+ query +' '+'FROM '+ typeOf+' '+'WHERE' +' '+  relatedField + ' = \'' + relatedId +'\'');
        objects = Database.query('SELECT'+ ' '+ query +' '+'FROM '+ typeOf+' '+'WHERE' +' '+  relatedField + ' = \'' + relatedId +'\'');
       //return Database.query('SELECT'+ ' '+ query +' '+'FROM '+ typeOf+' '+'WHERE' +' '+  relatedField + ' = \'' + relatedId +'\'');
       return objects;
    }
    public void setObjects(List<sObject> objects)
    {
        System.debug('ooo'+objects);
        this.objects = objects;
        //objects = s;
        //update objects;
        
    }
   public PageReference Save() {
        setObjects();
        update objects;
        System.debug('ooo'+objects);
        return null;
    }

}

getting child records in 'objects' but it's not getting saved and setobject method also not getting invoked.Where I am doing wrong here please help me with this
I need to query a set of records but every time I try I get an error message "Illegal assignment from List to Set".
      {Public <Team_Contact__c>   contacts = [Select Contact__c, Contact__r.Name, Contact__r.Account.Name, Contact__r.Branch_Id__c, Contact__r.MailingAddress, Contact__r.Type__c, Contact__r.Focus_List_Member__c  from  Team_Contact__c where Team__c = :primaryTeam  or  Team__c = :team2 or Team__c = :team3 or Team__c = :team4 or Team__c = :team5 ];
Hi, i am getting this error:
URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com. 

this is the javascript button i am using:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 

var url='/00T/e?title=Call&who_id={!Contact.Id}&&retURL=/{!Contact.Id}' 

if("{!$Profile.Name}" == "WICS" && ("{!$UserRole.Name}"=="AE - E"||"{!$UserRole.Name}"=="AE - W"||"{!$UserRole.Name}"=="AE - S")){ 
url+='&tsk5=Meeting'; 
url+='&tsk4={!TODAY()}'; 
url+='&tsk12=Completed'; 
url+='&RecordType=0120j0000008dlO'; 
url+='&ent=Task'; 
}else if("{!$Profile.Name}" == "WI Corporate Sales") { 
url+='&tsk5=Call'; 
url+='&followup=1'; 
url+='&tsk4={!TODAY()}'; 
url+='&RecordType=01250000000HiDD'; 
url+='&RecordType_fu=01250000000HiDD'; 
}else{ 
url+='&followup=1'; 
url+='&tsk5=Call'; 
}  
window.open(url,'_blank');

i am not getting where i am going wrong here can anyone help
I have a visualforce page with a custom controller to display a custom table of cases. I want to add a link for any given case listed for a user to accept the case. Can I use the $Action.Case.Accept function to achieve this? 

When I load the page I get the following error: 
"The value of the "ids" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information."



Page:
<apex:page controller="casePollList" >
	<div style="width:70%;">
	<div style = "width= 100%; text-align: center; font-size: 20px;">
		Academic Advising Queue
	</div>
        <apex:form >
            <apex:pageBlock id="myBlock" >
                <apex:actionPoller interval="10" rerender="myBlock" />
                <apex:pageBlockTable value="{!cases}" var="c" id="myTable">
                    <apex:column title="Link">
                        <apex:facet name="header">Case Number</apex:facet><apex:outputLink value="/{!c.id}" >{!c.CaseNumber}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!c.IOC_flag__c}"/>
                    <apex:column value="{!c.CaseNumber}"/>
                    <apex:column value="{!c.Subject}"/>
                    <apex:column title="Name"><apex:facet name="header">Name</apex:facet><apex:outputText >{!IF(c.contact.name != null, c.contact.name, c.suppliedname)}</apex:outputText></apex:column>
                    <apex:column value="{!c.Total_minutes_in_the_queue__c}"/>
                    <apex:column value="{!c.Type}"/>
                    <apex:column value="{!c.CreatedDate}"/>
                    <apex:column>
                        <apex:facet name="header">Owner</apex:facet>
                        <apex:outputText label="Owner" escape="false">{!c.Owner.Name}</apex:outputText>
                        <apex:outputLink value="{!URLFOR($Action.Case.Accept,c.id)}">Accept Case</apex:outputLink>
                    </apex:column>
            </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:form>
	</div>
</apex:page>


Controller: 
public class casePollList {
   public ApexPages.StandardSetController setCon {
      get {
         setCon = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT 
                                                                                id, 
                                                                                Subject, 
                                                                                CaseNumber, 
                                                                                Contact.Name, 
                                                                                Owner.Name, 
                                                                                Total_minutes_in_the_queue__c, 
                                                                                suppliedName, 
                                                                                Type,
                                                                                CreatedDate
                                                                                FROM Case WHERE owner.name='Academic Advising Requests Queue' order by CreatedDate Asc]));
         return setCon;
      }
      set;
   }
   // Initialize setCon and return a list of records
   public List<Case> getCases() {
      return (List<Case>) setCon.getRecords();
   }
}

 
Please help me on SOQL query using Like operator for Checklist Type in SF.
SELECT Order_Type__c,Part_number__c FROM Product where Order_Type__c 'Purchase%'

The below values are for Order_type__c field.
Annual Lease;Purchase;Short Term Lease
Fee
Lease
Lease;Purchase
Lease;Purchase;Short Term Lease
 
  • August 21, 2017
  • Like
  • 0
Hello,

We have not been able to get in to workbench for the past 2 days due to what looks like a dns error.  We have tried within the company, outside the organization and both on Chrome and IE with the same result
URL:  https://workbench.developerforce.com

Error Message:
This site can’t be reached
workbench.developerforce.com’s server DNS address could not be found.
Try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN

Anyone else get this or know of a fix?  

Thanks.
Hi There,
I see the below code in some apex examples. What's mean by {get;set;} here? please share some info or any links.
public Account acct {get;set;}
  • August 11, 2017
  • Like
  • 0