• Shebin-KVP Business Solns
  • NEWBIE
  • 75 Points
  • Member since 2012

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 21
    Replies

 

 

Error: Could not resolve the entity from <apex:outputField> value binding '{!xxxx__c}'. outputField can only be used with SObject fields.

 

Hi,

 

I am receiving this error, but the weird reason here is that I have the same code written for the same field type, etc.... and it works fine but for some strange reason I have created a few more field and now  I am trying to add them to the VF page and I am getting this error??

 

 

        </apex:pageBlockSection></div>
        <div style="page-break-after: auto;"><apex:pageBlockSection title="Account blalbla" columns="1" collapsible="false">
            <apex:outputField value="{!xxx__c}" />
            <apex:outputField value="{!yyy__c}" />
            <apex:outputField value="{!zzz__c}" />
        </apex:pageBlockSection></div>
        <div style="page-break-after: auto;"><apex:pageBlockSection title="Account Plan" columns="1" collapsible="false">
            <apex:outputField value="{!A__c}" />
            <apex:outputField value="{!B__c}" />
            <apex:outputField value="{!C__c}" />
            <apex:outputField value="{!D__c}" />
        </apex:pageBlockSection></div>

 

This is just some part of the code, however A__c or B__c, work fine.

But with the new fields I just created and want to add to the page (xxx__c, yyy__c) I got the error message!

 

Any suggestions??

 

Thank you!

  • January 20, 2012
  • Like
  • 0

I have a simple VF page that calls a custom controller to retrieve contacts for the account being viewed.  I would like to display a message such as "No records found" if the query returns no records.    I don't know if this should be added to the VF page or the controller.  Code is included below;

 

 


<apex:page controller="MSContactsCon3" showheader="false">
    <apex:pageBlock >
        <apex:pageBlockTable value="{!contacts}" var="o">
           <apex:column headervalue="Name" >
           <apex:outputlink value="/{!o.id}">{!o.name}</apex:outputLink>
           </apex:column>
           <apex:column value="{!o.title}"/>
           <apex:column value="{!o.phone}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>


public class MSContactsCon3 {

String accountVar = ApexPages.currentPage().getParameters().get('id');
    public ApexPages.StandardSetController setCon {
     
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT  Id, Title, Phone, Name,  Contact_type__c  FROM Contact Where AccountId =  :AccountVar     AND contact_type__c INCLUDES ( 'Executive Contact') Order by lastname]));
            }
            return setCon;
        }
        set;
    }
    public List<Contact> getContacts()
 {  
         return (List<Contact>) setCon.getRecords();
    }
}

I am working with a custom object that has a look up field. I was wondering if it is possible to plug in a partail name into the look up field and then search using the look up field. I know I can type the name into the look up and that works but I would like to auto fill the lookup field with a partail name. Im not sure if this is possible and would like some guidence. Thanks.

Hi All,

 

 Does anybody know  how to create  a site using apex code.

 

 My requirement is such that my app when installed in new instance it should check for any existing site, if note there it should create new one.

 

Please let me know if any solutions,

Thanks in Advance,

 

Shebin Mathew.

KVP Business Solutions.

Hi all,

 

 We are developing an apexchange app. While security review salesforce is asking to ensure field level security for each field updates. problem is that we have thousands of fields to update in all classes which are webservices.Now the number of lines without FLS is about 5-7  thousands, if i add FLS then the code will be double. So what is the best practice for this task and is there any short ways to accomplish the same?

 

Thanks in Advance,

Shebin Mathew,

KVP Business Solutions.

Hello,

We are developing an application and  packaging it and  installing different instances  . The package is integrated with an external ETL tool. This tool is supposed to send data to all the packaged instances. So the ETL tool has to connect to multiple salesforce instances. Problem is that the ETL tool cannot use multiple wsdls. As each instance may have different instance url the wsdls are different, different only by instance url, except all are same. Here It requires ETL tool has to use multiple wsdl. So is there any way to keep all wsdls generated from each instance having the same instance Url inside.

 

Thank you all in advance.

Hell All,

 

 Does anybody know salesforce can suport a wsdl with the soap address having .svc type. I wanted to parse a wsdl and gernerate apex class from that wsdl. It is parsing but while generating the apex code it is failing displaying the mesage "Unable to find soap 1.1 address" . Below is the wsdl.

  <?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions name="PMS2PLF" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
- <wsp:Policy wsu:Id="WSHttpBinding_IPMS2PLF_policy">
- <wsp:ExactlyOne>
- <wsp:All>
  <wsaw:UsingAddressing /> 
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsdl:types>
- <xsd:schema targetNamespace="http://tempuri.org/Imports">
  <xsd:import schemaLocation="http://gsreenivas/PMSSRV/PMS2PLF.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
  <xsd:import schemaLocation="http://gsreenivas/PMSSRV/PMS2PLF.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="IPMS2PLF_ReturnStatus_InputMessage">
  <wsdl:part name="parameters" element="tns:ReturnStatus" /> 
  </wsdl:message>
- <wsdl:message name="IPMS2PLF_ReturnStatus_OutputMessage">
  <wsdl:part name="parameters" element="tns:ReturnStatusResponse" /> 
  </wsdl:message>
- <wsdl:message name="IPMS2PLF_UpdateGuestTrace_InputMessage">
  <wsdl:part name="parameters" element="tns:UpdateGuestTrace" /> 
  </wsdl:message>
- <wsdl:message name="IPMS2PLF_UpdateGuestTrace_OutputMessage">
  <wsdl:part name="parameters" element="tns:UpdateGuestTraceResponse" /> 
  </wsdl:message>
- <wsdl:portType name="IPMS2PLF">
- <wsdl:operation name="ReturnStatus">
  <wsdl:input wsaw:Action="http://tempuri.org/IPMS2PLF/ReturnStatus" message="tns:IPMS2PLF_ReturnStatus_InputMessage" /> 
  <wsdl:output wsaw:Action="http://tempuri.org/IPMS2PLF/ReturnStatusResponse" message="tns:IPMS2PLF_ReturnStatus_OutputMessage" /> 
  </wsdl:operation>
- <wsdl:operation name="UpdateGuestTrace">
  <wsdl:input wsaw:Action="http://tempuri.org/IPMS2PLF/UpdateGuestTrace" message="tns:IPMS2PLF_UpdateGuestTrace_InputMessage" /> 
  <wsdl:output wsaw:Action="http://tempuri.org/IPMS2PLF/UpdateGuestTraceResponse" message="tns:IPMS2PLF_UpdateGuestTrace_OutputMessage" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="WSHttpBinding_IPMS2PLF" type="tns:IPMS2PLF">
  <wsp:PolicyReference URI="#WSHttpBinding_IPMS2PLF_policy" /> 
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="ReturnStatus">
  <soap12:operation soapAction="http://tempuri.org/IPMS2PLF/ReturnStatus" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="UpdateGuestTrace">
  <soap12:operation soapAction="http://tempuri.org/IPMS2PLF/UpdateGuestTrace" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="PMS2PLF">
- <wsdl:port name="WSHttpBinding_IPMS2PLF" binding="tns:WSHttpBinding_IPMS2PLF">
  <soap12:address location="http://gsreenivas/PMSSRV/PMS2PLF.svc" /> 
- <wsa10:EndpointReference>
  <wsa10:Address>http://gsreenivas/PMSSRV/PMS2PLF.svc</wsa10:Address> 
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Dns>localhost</Dns> 
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

 

Please share your ideas, Thanks in advance..

Shebin Mathew,

KVP Business Solutions.

Hi All,

 

 I have custom object with  one Rich Text Area field , previously the field was showing the image upload options and text formatting options , hyperlink option etc, but now it is not showing the rich text area header parts, instead showing as a long text area. Please help if you have any solution.

 

Thanks in Advance,

 

Shebin Mathew.

Hi All,

 

  Anybody know how to get the instance url in apex code. My requirement is such that , a mail should be sent to  a user of the instance which containing  hyperlink to a vf page something like  "/apex/merge_profiles?id=....". Since  I need to use absolute url to open salesforce page from gmail or any mail , I have to  use the server name something like that na12 , ap1 ....

So the resultant url should become like   "https://na12.salesforce.com/apex/merge_profiles?id=".

 

Since I cannot hard code the  server name na12 or ap1, I should get it programatically. 

 

Please share anybody know this...

 

Thanks in Advance,

Shebin Mathew

 

 

Hi All,

 

 How can I prvent from  navigating to standard page for records deleted and for other errors.

Our project is such that all pages should be in custom theme and styles. I have VF page for all objects.

Problem arises if the record , which I am going to open is already deleted ..  SFDC redirect me to standard

page and displaying record deleted with standard   header and sidebar. How can I prevent it. I  did not find any

organisation wide error page or anything else to prevent it in controller class also...

 

 

Please share your ideas....

 

Thanks in Advance

 

Shebin Mathew

KVP Business Solutions

Bangalore.

Hi All,

 

 How can I prvent from  navigating to standard page for records deleted and for other errors.

Our project is such that all pages should be in custom theme and styles. I have VF page for all objects.

Problem arises if the record , which I am going to open is already deleted ..  SFDC redirect me to standard

page and displaying record deleted with standard   header and sidebar. How can I prevent it. I  did not find any

organisation wide error page or anything else to prevent it in controller class also...

 

 

Please share your ideas....

 

Thanks in Advance

 

Shebin Mathew

KVP Business Solutions

Bangalore.

 

 Can anybody elaborate the steps to integrate  salesforce to salesforce .My  question is do we require wsdl files to use this,if it is so enterprise wsdl ,partner wsdl or apex wsdl?.

 

Thanks in Advance.

Hi All,

 

  We have configured customer portal to display one visual force page and  corresponding related lists. But when we use 

 <apex:relatedList list="some list id"/>  the page is generating error.But if i remove all   <apex:relatedList list="some list id"/>  the page is loading fine. Can any one help for this. Thanks in advance.

Hi, This is swamy

 

   I want details regarding something related to objects.

 Iam creating  a dropdown list for objects,if i select a single object  thus related records should be displayed in a pageblock table .If i change the object name from list thus records only displayed in a table.

 

 If anyone know's intimate me....plz

Hi All,

 

 I have custom object with  one Rich Text Area field , previously the field was showing the image upload options and text formatting options , hyperlink option etc, but now it is not showing the rich text area header parts, instead showing as a long text area. Please help if you have any solution.

 

Thanks in Advance,

 

Shebin Mathew.

Hi All,

 

  Anybody know how to get the instance url in apex code. My requirement is such that , a mail should be sent to  a user of the instance which containing  hyperlink to a vf page something like  "/apex/merge_profiles?id=....". Since  I need to use absolute url to open salesforce page from gmail or any mail , I have to  use the server name something like that na12 , ap1 ....

So the resultant url should become like   "https://na12.salesforce.com/apex/merge_profiles?id=".

 

Since I cannot hard code the  server name na12 or ap1, I should get it programatically. 

 

Please share anybody know this...

 

Thanks in Advance,

Shebin Mathew

 

 

Hi All,

 

 How can I prvent from  navigating to standard page for records deleted and for other errors.

Our project is such that all pages should be in custom theme and styles. I have VF page for all objects.

Problem arises if the record , which I am going to open is already deleted ..  SFDC redirect me to standard

page and displaying record deleted with standard   header and sidebar. How can I prevent it. I  did not find any

organisation wide error page or anything else to prevent it in controller class also...

 

 

Please share your ideas....

 

Thanks in Advance

 

Shebin Mathew

KVP Business Solutions

Bangalore.

Hi All,

 

 How can I prvent from  navigating to standard page for records deleted and for other errors.

Our project is such that all pages should be in custom theme and styles. I have VF page for all objects.

Problem arises if the record , which I am going to open is already deleted ..  SFDC redirect me to standard

page and displaying record deleted with standard   header and sidebar. How can I prevent it. I  did not find any

organisation wide error page or anything else to prevent it in controller class also...

 

 

Please share your ideas....

 

Thanks in Advance

 

Shebin Mathew

KVP Business Solutions

Bangalore.

 

I need to update start date and end date with the new values if the contract is set to Auto renew.

 

New Start Date = End Date + 1

New End Date = New Start Date + 60.

 

I created a workflow Rule with criteria End Date less than equal to Today and the time based field update workflow to trigger o days after end date. When I tested it the fields are not getting updated. Is there a better way to achieve this.

 

Thanks for your help and time.

 

 

Error: Could not resolve the entity from <apex:outputField> value binding '{!xxxx__c}'. outputField can only be used with SObject fields.

 

Hi,

 

I am receiving this error, but the weird reason here is that I have the same code written for the same field type, etc.... and it works fine but for some strange reason I have created a few more field and now  I am trying to add them to the VF page and I am getting this error??

 

 

        </apex:pageBlockSection></div>
        <div style="page-break-after: auto;"><apex:pageBlockSection title="Account blalbla" columns="1" collapsible="false">
            <apex:outputField value="{!xxx__c}" />
            <apex:outputField value="{!yyy__c}" />
            <apex:outputField value="{!zzz__c}" />
        </apex:pageBlockSection></div>
        <div style="page-break-after: auto;"><apex:pageBlockSection title="Account Plan" columns="1" collapsible="false">
            <apex:outputField value="{!A__c}" />
            <apex:outputField value="{!B__c}" />
            <apex:outputField value="{!C__c}" />
            <apex:outputField value="{!D__c}" />
        </apex:pageBlockSection></div>

 

This is just some part of the code, however A__c or B__c, work fine.

But with the new fields I just created and want to add to the page (xxx__c, yyy__c) I got the error message!

 

Any suggestions??

 

Thank you!

  • January 20, 2012
  • Like
  • 0

I have a controller extension that I'm using to populate a selectList.  I have two categories of information that I'd like users to be able to select from so I'm trying to create an indented type of look on the SelectList:

 

Type 1

Select 1

Select 2

Type 2

Select 1

Select 2

 

I can't seem to find a way to get any blank space to be maintained on the VF page I've tried among other things setting the style on the selectlist to style="white-space:pre;" and embedding non-breaking space in my selectoption string but that doesn't work - Options.add(new SelectOption(1, '&nbsp; Select 1'));

 

Any Suggestions? 

  • January 19, 2012
  • Like
  • 0

I have a simple VF page that calls a custom controller to retrieve contacts for the account being viewed.  I would like to display a message such as "No records found" if the query returns no records.    I don't know if this should be added to the VF page or the controller.  Code is included below;

 

 


<apex:page controller="MSContactsCon3" showheader="false">
    <apex:pageBlock >
        <apex:pageBlockTable value="{!contacts}" var="o">
           <apex:column headervalue="Name" >
           <apex:outputlink value="/{!o.id}">{!o.name}</apex:outputLink>
           </apex:column>
           <apex:column value="{!o.title}"/>
           <apex:column value="{!o.phone}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>


public class MSContactsCon3 {

String accountVar = ApexPages.currentPage().getParameters().get('id');
    public ApexPages.StandardSetController setCon {
     
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT  Id, Title, Phone, Name,  Contact_type__c  FROM Contact Where AccountId =  :AccountVar     AND contact_type__c INCLUDES ( 'Executive Contact') Order by lastname]));
            }
            return setCon;
        }
        set;
    }
    public List<Contact> getContacts()
 {  
         return (List<Contact>) setCon.getRecords();
    }
}

I would like to change the color of one of my pageblocksections. Below is just a sample if what I would like to do. I would like to change the color of the first pageblocksection. I would like to know if this is possible or not. 

 

Thanks. 

<apex:page>
<apex:form>
    <apex:pageblock>
        <apex:pageBlockSection>
            <apex:pageBlockSection>
            </apex:pageBlockSection>
            <apex:pageBlockSection>
            </apex:pageBlockSection>
        </apex:pageBlockSection>
    </apex:pageblock>
</apex:form>
<apex:page>

 

Hi,

 

  I'm using Salesforce.com partner web service to search a contact by phone number and using SOQL in its query call. It looks like the phone number has to match exactly. For instance, the following SOQL query:

 

select FirstName, LastName, Id, phone where phone like  '%(xxx) yyy-zzzz')

 

is able to find a Contact whose phone# is exactly (xxx) yyy-zzz or something like +1(xxx) yyy-zzzz but it can't match numbers like:

 

(xxx)yyy-zzzz(with no embedded blanks)

xxx-yyy-zzzz

1xxxyyyzzzz

001xxxyyyzzzz

(xxx)  yyy - zzzz(multiple embedded blanks)

 

Is there a way to write a SOQL query so that it matches a contact's phone number regardless of the punctuation?

 

Thanks in advance and regards

Hello,

 

I want to add a value to a field on a before insert trigger.

I want to make an auto number with different conditions so to select the last number and set the value = last + 1 to the field.

Where can I find a documentation for that ? To add a value to a field on before insert ?

I don't know how to recover this value :

Opportunity q_opp = [SELECT MAX(Opp_Num__c) FROM Opportunity];

and what it will return if there is no record in the table.

Thank you.

Hi All,

 

I am trying to pass a picklist value into a sql query "order by" clause

 

However i am not able to use the syntax :

 

:<variable name> in order by

 

Could you please suggest me a solution to this

 

Regards

Rajat.

I am working with a custom object that has a look up field. I was wondering if it is possible to plug in a partail name into the look up field and then search using the look up field. I know I can type the name into the look up and that works but I would like to auto fill the lookup field with a partail name. Im not sure if this is possible and would like some guidence. Thanks.