• lamayc
  • NEWBIE
  • 80 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 25
    Replies

Should an <apex : iframe> be re-rendered if its ID is specified in the reRender property of an actionFunction?

 

It does not seem to be working for me.

 

 

Thanks

I had Installed the force.com plugin for eclipse3.4.

 

when i create a project,the panel requested an username and an password, my question is

 

what's the username and password .

 

  • March 18, 2009
  • Like
  • 0

I'm new to VF, coming from scontrols.  I have some custom objects related to Opportunities which can each have tasks related to them.  The salesguys want to see one list of tasks, no matter which of the custom objects or indeed the Opportunity itself they are related to.  I've been trying to write a list controller for tasks with no luck at all.  I know there is no standard controller for listing tasks but is there any reason why a custom controller would not work?  Does anyone have some template code I could use as I'm new to Apex as well and I can't get my code accepted by the IDE?

Apex Code is as follows (still needs the query to be filtered but am trying to get proof of concept first):

 

public class OppTasks { public ApexPages.StandardSetController setCon { get { if(setCon == null) { setCon = new ApexPages.StandardSetController(Database.getQueryLocator([Select WhatId, Subject, Status, OwnerId, Id, Description, ActivityDate From Task])); } return setCon; } set; } public List<Task> getActivities() { return (List<Task>) setCon.getRecords(); } }

 Visualforce page:

 

<apex:page controller="OppTasks"> <apex:form > <apex:pageblock id="thePage"> <apex:pageblocktable value="{!activity}" var="t" > <apex:column value="{!t.Subject}"/> <apex:column value="{!t.WhatId}"/> <apex:column value="{!t.Status}"/> <apex:column value="{!t.ActivityDate}"/> </apex:pageblocktable> </apex:pageblock> </apex:form> </apex:page>

 I have tried a variety of values  including {!tasks}, I get the error "Unknown property OppTasks.activity".

 

Can anyone help a newbie?  Many thanks - Erica

 

 

 

 

  • February 25, 2009
  • Like
  • 0

Is there anyway to disable the sidebar and header on default pages (i.e. default edit page).

 

This is what I have:

I have my home page with the header and sidebars.

In the main area, I display a list of things to do (tasks ...)

When I click on one of the items, instead of going to a new page, it just pops up the view or edit page in a section (iframe) below the list.

 

The problem is that the iframe also has the header and sidebar in it.

 

Suggestions?

Thanks.

  • February 18, 2009
  • Like
  • 0

setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select id, subject from Task where RecordType.Name = :recordType]));

 

getting error: List controllers are not supported for Task

 

Our company works such that most tasks are not assigned to people but rather as someone gets one task done (or a group of tasks done), the next task (or group of tasks) is assigned them (tasks are initially just a large group of things to do for the whole organization).

 

Any idea why list controller are not supported for tasks, and/or suggestions.

 

Thanks.

 

  • February 18, 2009
  • Like
  • 0
    I am having problems setting my many-to-many relationship. Right now I am using the enterprise.wsdl and writing in Java (I could  do it in Apex too, it really makes no difference). I have a custom object called Reject_Codes__c. On opportunity can have multiple reject codes, and likewise a reject code will link to many opportunities. I went into my reject object and created a lookup relationship to opportunity

    <fields>
        <fullName>Opportunity__c</fullName>
        <label>Opportunity</label>
        <referenceTo>Opportunity</referenceTo>
        <type>Lookup</type>
    </fields>

Child Relathionship Name: RejectCodes
Related List Label : Reject Codes

and on opportunity

    <fields>
        <fullName>RejectCodeLink__c</fullName>
        <label>Reject Code</label>
        <referenceTo>Reject_Codes__c</referenceTo>
        <relationshipLabel>Opportunities</relationshipLabel>
        <relationshipName>Opportunities</relationshipName>
        <type>Lookup</type>
    </fields>

Child Relathionship Name: Opportunities
Related List Label : Opportunities

to test it I am trying :

          Opportunity opp = ....
          Reject_Code_Maintenance__c obj = new Reject_Code_Maintenance__c();
          Reject_Code_Maintenance__c obj2 = new Reject_Code_Maintenance__c();
          QueryResult qr = new QueryResult();
          obj.setReject_Code__c("88");   // this is the external id -- note that first I tried using the salesforce Id using setId, but the api puked on this saying that Id wasn't indexed WTF?

          obj2.setReject_Code__c("79");
          SObject[] aa = new SObject[]{obj, obj2};
          qr.setRecords(aa);
          opp.setRejectCodes__r(qr);
          conn.update(new SObject[]{opp});

and I get the following :

 faultString: INVALID_FIELD: No such column 'RejectCodes__r' on entity 'opportunity'.

even though the enterprise.wsdl had the appropriate method (setRejectCodes__r(QueryResult qr))

What am I doing wrong please?

I am trying to create a google gadget to display company phone list information. I created a simple visualforce page to get the info I need and format it into XML for consumption into the gadget. I can't seem to get a valid response in to the gadget however. I assume it is because you have to log in to get the visualforce page and I don't believe I can get the gadget to do the login. Or maybe I am just doing something wrong. Any suggestions would be greatly appreciated.

Here is the relevant part of my gadget:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Phone List"
scrolling="true"
author="Christopher La May"
author_email="dragonmagicl@gmail.com/>
<Content type="html">
<![CDATA[
<div id="content_div"></div>
<script type="text/javascript">
 function displayList() {
// XML Phone List data
var url = "https://na5.salesforce.com/apex/test_vf_page";
var prefs = new _IG_Prefs();
_IG_FetchContent(url, function (response) {
if (response == null || typeof(response) != "object" ||
response.firstChild == null) {
_gel("content_div").innerHTML += "<i>Invalid data.</i>";
return;
}
...
});
}
_IG_RegisterOnloadHandler(displayList);
</script>
]]>
</Content>
</Module>
I have a master product list. Each client gets a different percentage off price on products. Can I do this and will everything stay in sync with master price book?
 
Example : Have master price book with 1000 products (each with its own price of course). Client X gets 10% off each product. Client Y gets 20% off. Client Z gets 30% off. I am assuming (please correct me if there is a better way) that I need to create 3 cloned price books for this and set the prices appropriately.
 
1) I do not see any way to set a formulae in a price book, so I would have to enter each price manually. (A pain to have to program something for this, but doable). It would of course be great if I could just set a discount formulae though ... ie price book A has 10% discount on all items.
 
2) Can I set the other price books to automatically be updated with new products ftom the master list (since all the price books have the same exact products). For example, if a add 50 new products to the master list, I would ideally like the other 3 price books to pick up the products and of course have the discounts correctly applied for these products. (Again, a pain to have to program something in for this, like maybe a trigger on master price book change, blah, blah ... but if there is something already available for this, that would be fantastic).
Getting the following when trying to create salesforce project in eclipse connecting to my sandbox

Unable to create connection to Salesforce:
sObject type 'Project' is not supported.

Does this mean that I can not get a copy of my sandbox stuff as an eclipse project? Or is there another way I can sync up files from a sandbox account?

I have tried this both with an Apex only sandbox and a full sandbox.

Thanks
How to get the HTML table header in each page in PDF? I've tried with thead {display:table-header-group; } into CSS which is not supporting in HTMLTOPDF.. Please help me out.
Hi, I'm new developing apex classes and I would like know what sould i do to use the java classes included in a jar file in an apex classes, this jar's are in the classpath already... explaining little more: In an apex class in want to use some methods in some classes that are developed in java and this classes are included in jar files, I can't translate that classes in java code to classes in apex code for external reasons, so necessarily I must use that jar's. If someone can help me I'll preciate.
  • January 08, 2010
  • Like
  • 0

Should an <apex : iframe> be re-rendered if its ID is specified in the reRender property of an actionFunction?

 

It does not seem to be working for me.

 

 

Thanks

I had Installed the force.com plugin for eclipse3.4.

 

when i create a project,the panel requested an username and an password, my question is

 

what's the username and password .

 

  • March 18, 2009
  • Like
  • 0

My Cases Homepage list is only displaying 20 Cases. Even though I have not stipulated a limit to display is there some default to how Visualforce displays lists?

 

Here is my page code:

 

<apex:form id="theForm"> <apex:pageBlock title="Cases Home"> <b>You are viewing {!$User.FirstName} {!$User.LastName}'s Open and Closed Trouble Tickets</b> </apex:pageBlock> </apex:form> <apex:form > <apex:pageBlock > <apex:pageBlockButtons location="top"> <apex:commandButton action="/apex/CustomerPortalNewCase" value="Create New Case" id="newCaseButton"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!cases}" var="c" id="c_table"> <apex:column headervalue="Case Number"> <apex:outputLink value="/{!c.Id}" target="_self">{!c.casenumber}</apex:outputLink> </apex:column> <apex:column headervalue="Subject"> <apex:outputLink value="/{!c.Id}" target="_self">{!c.subject}</apex:outputLink> </apex:column> <apex:column headervalue="Priority"> <apex:outputField value="{!c.priority}"/> </apex:column> <apex:column Value="{!c.status}" style="{!IF(c.Status='New', 'color:brown;font-weight: bold',IF(c.Status='In Progress', 'color:green;font-weight: bold',IF(c.Status='On Hold','color:red;font-weight: bold',IF(c.Status='Get Acceptance','color:blue;font-weight: bold',IF(c.Status='Closed','color:clack;font-weight: bold','color:grey')))))}"/> <apex:column headervalue="Created By"> <apex:outputField value="{!c.createdbyID}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> <apex:pageBlock > <apex:pageBlockSection > <c:CaseQuickTipsGuideComponent /> <c:CaseAttachmentsInstructions /> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>

 

 

 

Hi All:

 

I'm developing using Eclipse and trying to figure out why I keep getting "Referenced Packages" in my project definition.

 

I'm using a standard 2-person development org. Made a new project in Eclipse, and defined it to include just a single Apex class.

 

When the project is done building, I have my src folder, with src/classes/MyClass.cls. But I also have a "Referenced Packages" folder with, in this case, a bunch of stuff from the Ajax Toolkit.

 

IN this case, it makes the local project hard to manage or delete since the resources come down as read-only. On another larger project I'm working on, it's a much larger pain, as Eclipse tries to run tests in the referenced packages (which I don't manage or control) when I am running unit tests.

 

Can anyone help me understand why this happens, and whether it can be avoided?

 

Thanks,

 

Steve Lane

  • March 13, 2009
  • Like
  • 0

Hi,

 

Below is my business case

 

We have clients in Salesforce.com The financial transactions related to these clients are available in an external system.

 

I would like to know if we can dynamically access the financial data from the external system through an API and display the same in Salesforce.com without the need for replicating the data in Salesforce.com.

 

If yes please let me know how this can be achieved.

 

This may be a very basic question, being a newbie I would need your assistance.

 

Thanks in advance

 

 

 

 

 

 

Hi,

     Can anyone please solve my error. 

Am facing same error when:

 

1. Trying to generate java API from the WSDL file.

2. At the line: binding = (SoapBindingStub) new SforceServiceLocator().getSoap(); in my program.

 

The common error is: 

 

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
        at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:45)
        at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
        at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
        at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)

 

The jar files included in the class path are:

 

C:\axis-1_3\lib\activation.jar;
C:\axis-1_3\lib\axis.jar;
C:\axis-1_3\lib\axis-ant.jar;
C:\axis-1_3\lib\axis-schema.jar;
C:\axis-1_3\lib\commons-discovery-0.2.jar;
C:\axis-1_3\lib\commons-logging-1.0.4.jar;
C:\axis-1_3\lib\jaxrpc.jar;
C:\axis-1_3\lib\log4j-1.2.8.jar;
C:\axis-1_3\lib\mail.jar;
C:\axis-1_3\lib\saaj.jar;
C:\axis-1_3\lib\wsdl4j-1.5.2.jar;
C:\axis-1_3\lib\wsdl4j.jar;
C:\axis-1_3\lib\commons-logging-1.1.1.jar;

 

 

Can anyone please help me to solve the error.

 

Thanks in adv,

-Vissu

We're looking into officially supporting Eclipse 3.4 in an upcoming release of the Force.com IDE.  If you've tried to install the IDE plugin into Eclipse 3.4, please help us by sharing your experiences here.

  • What issues, if any, did you experience while installing the IDE in Eclipse 3.4?
  • What features, if any, failed to work in Eclipse 3.4?  Were you able to resolve any of these issues yourself?
  • What features worked normally in Eclipse 3.4?  Have you used the IDE in Eclipse 3.3 or 3.2.2, for comparison?

Your feedback is invaluable to usin ensuring a high quality release.

 

Thanks,

Jon

salesforce.com Product Manager

  • March 05, 2009
  • Like
  • 0

I'm new to VF, coming from scontrols.  I have some custom objects related to Opportunities which can each have tasks related to them.  The salesguys want to see one list of tasks, no matter which of the custom objects or indeed the Opportunity itself they are related to.  I've been trying to write a list controller for tasks with no luck at all.  I know there is no standard controller for listing tasks but is there any reason why a custom controller would not work?  Does anyone have some template code I could use as I'm new to Apex as well and I can't get my code accepted by the IDE?

Apex Code is as follows (still needs the query to be filtered but am trying to get proof of concept first):

 

public class OppTasks { public ApexPages.StandardSetController setCon { get { if(setCon == null) { setCon = new ApexPages.StandardSetController(Database.getQueryLocator([Select WhatId, Subject, Status, OwnerId, Id, Description, ActivityDate From Task])); } return setCon; } set; } public List<Task> getActivities() { return (List<Task>) setCon.getRecords(); } }

 Visualforce page:

 

<apex:page controller="OppTasks"> <apex:form > <apex:pageblock id="thePage"> <apex:pageblocktable value="{!activity}" var="t" > <apex:column value="{!t.Subject}"/> <apex:column value="{!t.WhatId}"/> <apex:column value="{!t.Status}"/> <apex:column value="{!t.ActivityDate}"/> </apex:pageblocktable> </apex:pageblock> </apex:form> </apex:page>

 I have tried a variety of values  including {!tasks}, I get the error "Unknown property OppTasks.activity".

 

Can anyone help a newbie?  Many thanks - Erica

 

 

 

 

  • February 25, 2009
  • Like
  • 0

I am very new at this. I am trying to use Apex dataloader to synchronize records from Salesforce to Mysql database. I started with the examples in samples folder which comes with Apex data loader installation. Can any of you please tell me what will be the driverclass name and url value for mysql in database-conf.xml.

 

<bean id="dbDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@my.server.com:1521:dataBaseName"/> <property name="username" value="user"/> <property name="password" value="password"/> </bean>

 

Thanks

Sue

  • February 16, 2009
  • Like
  • 0

Hello All,

 

I have a custom page and controller.  I am trying to do some error handling within the controller as such:

 

public PageReference sendMail2PM(){
   

string PMID = [select Deliverable_Owner__c from P4_Contract_Deliverable__c where id = :this.cd.id].Deliverable_Owner__c;

 

string PMEmail = [select email from contact where id=:PMID].email;

 

if(PMEmail==null){
    PageReference errorPage = new PageReference('https://cs1.salesforce.com/apex/errorLanding');
    errorPage.setRedirect(true);
    return errorPage;
    }

 

}

 

My problem is that when the redirect happens, somehow "inline=1" gets appended to the URL.  It seems that when the inline parameter is present then the page renders without headers or sidebars.  I want the header and sidebar so users know they are still in saleforce.

 

Where is the "inline=1" coming from and how do I get rid of it?  Or else how do I make the redirect happen with headers and sidebars?

  • February 05, 2009
  • Like
  • 0

Hi,

 

I need help in finding a solution of opening a Word Document from SControl.

Let me explain the scenario.

Word Document is uploaded as an Attachment to Salesforce system. 

 

Now my requirement is that when i click a View button in my Scontrol, i have to retrieve the content of Word Doc attachment and modify some values in that content.

Then this modified word doc content should be opened as a Word Document from the SControl.

 

So what should be done to achieve this.

 

Any help on this will be highly appreciated.

 

Thanks,

OnDem

Hi All,
 
How to get the distinv values using SOQL.
 
In SQL we use DISTINCT keyword.
 
How about in SOQL.
 
Kindly tell me since its delaying my work.
 
Thanks.
 
  • January 15, 2009
  • Like
  • 0