• Eriksson
  • NEWBIE
  • 100 Points
  • Member since 2009

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 11
    Replies

Is it possible to query a records based on a picklist value so that I query all objects above or below the specific picklist value. For example if I have pickilist Example__c in my custom object CustomObject__c

 

Example__c contains values contains values

Example1

Example2

Example3

Example4

 

Now I would like to make a SOQL query to fetch all the records who Example__c field set to value above 'Example3'. Is this possible? Could I use getPicklistValues() method to define which values are above the specific value? In other words does the getPicklistValues() return the values in the correct order?

  • April 07, 2010
  • Like
  • 0

The following line:

 

 

Account: <apex:outputText value="{!X360_Contract_Cycle__c.Account__c}" />

 Produces the following on my VisualForce page (rendered as pdf):

 

 

Prepared for: 001Q0000008olvcIAA

 

I tried changing this to outputField instead of outputText (example below):

 

 

Account: <apex:outputField value="{!X360_Contract_Cycle__c.Account__c}" />

This displays the account name correctly (not the record ID).  That is good....except it included the account name as a selectable link on the rendered PDF.  What is the best way to output the value, not as the record ID, and not include the value as a link?  So far running into a little bit of a catch 22.  Thanks in advance for the help! 

 

Hello everyone!!!

 

 

I have an object (named percentages) with two lookup fields, one goes to Contact, and the other one to the custom object Balance.

 

I want to obtain with a SF class and a VF Page, those percentages where the owner of the Contact is not the owner of the balance.

 

Apparently, It's easy to deploy, but here is the issue; I've almost 10000 records for each one of those objects, so It's gives me a lot of; "too many records" error message!

 

Any idea?!?  Please I do need this information!!

 

Thanks in advance!!!!!! 

Hi guys,

 

Here is my situation, I want to query multi-select picklists in static soql, I have done this in dynamic soql, but in static soql, I don't know how to do it?

 

code snippet:

 

String categories = 'Featured, Super Featured';List<Product2> products = [select Category__c from Product2 where Category__c includes (:categories)];

 

In this way, I want to select all the products include Featured or Super Featured category, but I cannot get the right records.

 

But in this way, I got the right records.

 

List<Product2> products = [select Category__c from Product2 where Category__c includes ('Featured','Super Featured')];

Is there anyone can help me this problem? Thanks in advance!!

 

Thanks

 

Message Edited by Eriksson on 03-02-2010 12:50 AM
Message Edited by Eriksson on 03-02-2010 05:03 PM
Message Edited by Eriksson on 03-02-2010 05:04 PM

Hi guys,

 

Did anybody try to invoke the Chargent SFA in force.com site? After installing the package of Chargent SFA, the installed package required managing licenses, so I added the system admin who installed this package to licensed users list. Then I created a page and related controller the chargent SFA method will be invoked. Since I didn't use the with sharing or without sharing, so this class will be executed in system mode, but while I open the page in force.com site, I got an error that I have no right to access the chargent SFA.

Here is my page url: http://sitethemeextension-developer-edition.na7.force.com/chargeopportunity. This problem only exsited in dev org, I tried it in free edition or enterprise edtion, both worked well.

 

Is there anyone encounterd this issue?

 

Thanks,

Eric

 

Is there anybody know how to upload a static resource using web service API or something?

 

I want to dynamically create a static resource using API, but the StaticResource does not support DML Operation. Is there any other way to do that? say Metadata API?

 

Thanks!

Hey all, I have a trigger that is looping through all opportunities that have been updated and syncing the information to any contracts that are existing. I have a for loop going through each opportunity effected and then my test class is getting caught up on

 

newmonthcontracts = OppIDs[0].Term_Yrs__c.intValue() * 12;

 

I have the similar code in the test class that does this feature and have a systemassertequals to check it, but its still not covering the code.

 

Do I need to do something in perticular for the loop so that it validates? It seems to only be the code in the loop.

We were able to migrate the custom objects from our main Development Org to parallel secondary Development Orgs using "Deploy to server" in Eclipse. But, we are unable to do the same with Apex code. The error log includes the following:

 

dependent class is invalid and needs recompilation,

variable does not exist,

invalid type; 

 

Is there an easy way to deploy the classes to the other server?

Is it possible to query a records based on a picklist value so that I query all objects above or below the specific picklist value. For example if I have pickilist Example__c in my custom object CustomObject__c

 

Example__c contains values contains values

Example1

Example2

Example3

Example4

 

Now I would like to make a SOQL query to fetch all the records who Example__c field set to value above 'Example3'. Is this possible? Could I use getPicklistValues() method to define which values are above the specific value? In other words does the getPicklistValues() return the values in the correct order?

  • April 07, 2010
  • Like
  • 0

Hello, 

What criteria can I use in a SOQL query to find the last created record?  For e.g. If I have 3 records created on 4/1, 3/31 and 3/28, the query should return the record created on 4/1.

Thanks.

  • April 06, 2010
  • Like
  • 0

The following line:

 

 

Account: <apex:outputText value="{!X360_Contract_Cycle__c.Account__c}" />

 Produces the following on my VisualForce page (rendered as pdf):

 

 

Prepared for: 001Q0000008olvcIAA

 

I tried changing this to outputField instead of outputText (example below):

 

 

Account: <apex:outputField value="{!X360_Contract_Cycle__c.Account__c}" />

This displays the account name correctly (not the record ID).  That is good....except it included the account name as a selectable link on the rendered PDF.  What is the best way to output the value, not as the record ID, and not include the value as a link?  So far running into a little bit of a catch 22.  Thanks in advance for the help! 

 

i am trying to convert a S-Control to a visualforce button and i keep getting an

ErrorError: Unknown property 'OpportunityStandardController.Account'

 This is to allow the user to print opportunity information and send it to a customer.

 

Do i start off the apex code with <apex:page standardController="Opportunity">

 

some of the beginning code looks like this:

 

<script src="/soap/ajax/9.0/connection.js" type="text/javascript"></script>
<script src="/js/dojo/0.3.1/dojo.js"></script>
<script src="/soap/ajax/8.0/apex.js"></script>

<script>

    function startPage() {
        var envurl = location.protocol + "//" + location.host + "/";
        var user = sforce.connection.getUserInfo().userEmail;
        document.getElementById('reply_to').value = user;

        var accountId = "{!Account.Id}";
        var oppID = "{!Opportunity.Id}";
        var oppUrl = envurl + oppID;

        var AccountSQL = "SELECT a.Id, a.Name FROM Account a where a.Id = '" + accountId + "'";

  • April 05, 2010
  • Like
  • 0

I created a new custom object related to 'Opportunity'. Now, I have triggers for insert, delete and update on Opportunity. Data is added into the custom object based on these triggers. My salesforce already has 100s of Opportunities, how do I populate my custom object with data from Opportunity  ( without manually having to edit each Opportunity - which is not the step I'm taking ).

 

Is there a process in salesforce/apex to run a one-time data load.

 

 

Thanks,
Chandra. 

 

 

Hello everyone!!!

 

 

I have an object (named percentages) with two lookup fields, one goes to Contact, and the other one to the custom object Balance.

 

I want to obtain with a SF class and a VF Page, those percentages where the owner of the Contact is not the owner of the balance.

 

Apparently, It's easy to deploy, but here is the issue; I've almost 10000 records for each one of those objects, so It's gives me a lot of; "too many records" error message!

 

Any idea?!?  Please I do need this information!!

 

Thanks in advance!!!!!! 

Does anyone have a good code sample of a Save() method that refreshes the vf page on itself?  OR can help me with my code below?

 

I have a vf form accessed via a sites page ...on save, i want to have the form insert the data and then refresh the newly created page.

 

I tried to do this via onclick action on the command:save ..but doesnt seem to work.

 

here is my current approach (not working)

 

<apex:commandButton action="{!save}" value="Calculate" onclick="back();"/>
 <script type="text/javascript">
function back()
{
window.parent.location.href='{!$Page.FAA_Compensation_Calculator}?id={!$CurrentPage.parameters.id}&txt={!$CurrentPage.parameters.txt}';
}
</script>

 

Tx!

Hi guys,

 

Here is my situation, I want to query multi-select picklists in static soql, I have done this in dynamic soql, but in static soql, I don't know how to do it?

 

code snippet:

 

String categories = 'Featured, Super Featured';List<Product2> products = [select Category__c from Product2 where Category__c includes (:categories)];

 

In this way, I want to select all the products include Featured or Super Featured category, but I cannot get the right records.

 

But in this way, I got the right records.

 

List<Product2> products = [select Category__c from Product2 where Category__c includes ('Featured','Super Featured')];

Is there anyone can help me this problem? Thanks in advance!!

 

Thanks

 

Message Edited by Eriksson on 03-02-2010 12:50 AM
Message Edited by Eriksson on 03-02-2010 05:03 PM
Message Edited by Eriksson on 03-02-2010 05:04 PM

Hi guys,

 

Did anybody try to invoke the Chargent SFA in force.com site? After installing the package of Chargent SFA, the installed package required managing licenses, so I added the system admin who installed this package to licensed users list. Then I created a page and related controller the chargent SFA method will be invoked. Since I didn't use the with sharing or without sharing, so this class will be executed in system mode, but while I open the page in force.com site, I got an error that I have no right to access the chargent SFA.

Here is my page url: http://sitethemeextension-developer-edition.na7.force.com/chargeopportunity. This problem only exsited in dev org, I tried it in free edition or enterprise edtion, both worked well.

 

Is there anyone encounterd this issue?

 

Thanks,

Eric