• jeroen
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 18
    Replies

Hello,

 

I would like to customize the Ideas object. I would like certain users to be able to vote and others only be able to view the ideas. I am somewhat familiar with apex code and visualforce pages, I have tried creating a VF page with a standard controller Idea.

 

<apex:page standardController="Idea" showHeader="true" > <apex:detail relatedList="true" title="true" relatedListHover="true"/> <apex:relatedList list="Votes"/>

</apex:page> 

 

I can not get any related list in view. Like Votes or Comments, they are listed in the WSDL. I thought I could do a check if the user has a certain profile, than he/she would be allowed to vote otherwise only view. 

 

Is there anyone who can shed some light on this?

 

Thanks

Jeroen 

  • October 25, 2009
  • Like
  • 0

Hi everyone,

 

Having difficulties with this formula. In a custom formula field. I need to check if the (dutch)bank account is valid. Basically I have to multiply each number in the account and than divide it by 11. If it is a round number it's good otherwise not! Bank_account__c is a text field, because it is also possible to have other chars in the number (different system).

 

IF (MOD(    ( VALUE(LEFT(TRIM(Bank_Account__c) , 1))* 9)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 2),1)) * 8)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 3),1)) * 7)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 4),1)) * 6)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 5),1))  * 5)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 6),1))  * 4)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 7),1))  * 3)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 8),1)) * 2)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 9),1))  * 1)

 , 11) > 0, "WRONG" , "OK")

 

Problem is --> Error: Compiled formula is too big to execute.

I have tried a lot. But can't really get it smaller. If someone has a trick to extract all the individual numbers, than I am in buisiness :smileyhappy:

 

Hope to hear more.

Thanks

Jeroen

Message Edited by jeroen on 02-16-2009 12:51 PM
Message Edited by jeroen on 02-17-2009 12:52 AM
  • February 16, 2009
  • Like
  • 0
Hello, There must be a simple solution, bit somehow I can't get it. To check validity on a dutch bank account (text string) I need to extract al the chars in the account and do some sort of formula on it. How do I extract say the 3rd char. from a string. Now I use VALUE(RIGHT(LEFT(String__c,3),1)). Get all char upto 3rd form the start of a text string and than get the 1st char from the end. Than with Value I change it to a number. In this case the formula gets to long ( I need to do this 9 times and than add other logic) Anybody have an idea how to extract a char from a string in a different way? Thanks Jeroen
  • February 05, 2009
  • Like
  • 0

Hello,

 

I am trying to create a page where users are able to vote to go on with a project or not. I looked at ideas, but that doesn't cover it for us.

So I am trying to make it myself. I have made a custom object Vote with a master-detail towards projects.

People are also able to make comments without voting, however they are only allowed to vote once! This is where the problem hits.

There is a picklist vote__c with the options None, Yes, No. If that user has made an earlier entry Yes or No he/she must not be allowed to vote! So in this case a boolean Able-vote (or something) must be set to false. So I can use this in the apex code!

 

I have not much experience with custom controllers, hope to in the future.

 

Thanks

Jeroen

  • January 07, 2009
  • Like
  • 0
Hello,
 
I am having difficulties getting this to work. I just want the name of the person that created a record in my custom object Project_info__c. I have tried using a standard and a custom controller, since I am not doing much spectacular stuff I would rather stick to the standardcontroller for now.
 
<apex:outputtext value="{!Project_info__c.CreatedById.Lastname}"/>
 
Error: The class 'java.lang.String' does not have the property 'LastName'.
 
Other methode:
<apex:dataList value="{!Project_info__c.CreatedById}" var="r">
        {!r.FirstName}
</apex:dataList>
 
Same error...:smileysad:
 
Any ideas, Thanks
Jeroen:smileyvery-happy:

Hello,

 

I would like to customize the Ideas object. I would like certain users to be able to vote and others only be able to view the ideas. I am somewhat familiar with apex code and visualforce pages, I have tried creating a VF page with a standard controller Idea.

 

<apex:page standardController="Idea" showHeader="true" > <apex:detail relatedList="true" title="true" relatedListHover="true"/> <apex:relatedList list="Votes"/>

</apex:page> 

 

I can not get any related list in view. Like Votes or Comments, they are listed in the WSDL. I thought I could do a check if the user has a certain profile, than he/she would be allowed to vote otherwise only view. 

 

Is there anyone who can shed some light on this?

 

Thanks

Jeroen 

  • October 25, 2009
  • Like
  • 0

I created a custom object named as "Currency__c" and set on the option of track field history for this object. Then I want to build a detail page for this object with the related list of Currency History displayed on a separate tab.

 

According to Force.com documentation, Force.com will create an object called Currency__History object automatically when I set on the option of track field history for Currency__C object.

 

Also by checking the schema definition, I found that the child relationship name for Currency__History object is "Histories". Therefore, I put the following coding in the Visualforce page:

 

<apex:relatedList list="Histories" />

 

However, when I execute the Visualforce page, I receive the following error:

 

'Histories' is not a valid child relationship name for entity Currency

 

Would anyone pls help me and indicate what I have done incorrectly?

Hi everyone,

 

Having difficulties with this formula. In a custom formula field. I need to check if the (dutch)bank account is valid. Basically I have to multiply each number in the account and than divide it by 11. If it is a round number it's good otherwise not! Bank_account__c is a text field, because it is also possible to have other chars in the number (different system).

 

IF (MOD(    ( VALUE(LEFT(TRIM(Bank_Account__c) , 1))* 9)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 2),1)) * 8)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 3),1)) * 7)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 4),1)) * 6)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 5),1))  * 5)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 6),1))  * 4)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 7),1))  * 3)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 8),1)) * 2)

 + (  VALUE(RIGHT(LEFT(TRIM(Bank_Account__c) , 9),1))  * 1)

 , 11) > 0, "WRONG" , "OK")

 

Problem is --> Error: Compiled formula is too big to execute.

I have tried a lot. But can't really get it smaller. If someone has a trick to extract all the individual numbers, than I am in buisiness :smileyhappy:

 

Hope to hear more.

Thanks

Jeroen

Message Edited by jeroen on 02-16-2009 12:51 PM
Message Edited by jeroen on 02-17-2009 12:52 AM
  • February 16, 2009
  • Like
  • 0
Hello, There must be a simple solution, bit somehow I can't get it. To check validity on a dutch bank account (text string) I need to extract al the chars in the account and do some sort of formula on it. How do I extract say the 3rd char. from a string. Now I use VALUE(RIGHT(LEFT(String__c,3),1)). Get all char upto 3rd form the start of a text string and than get the 1st char from the end. Than with Value I change it to a number. In this case the formula gets to long ( I need to do this 9 times and than add other logic) Anybody have an idea how to extract a char from a string in a different way? Thanks Jeroen
  • February 05, 2009
  • Like
  • 0

Hello,

 

I am trying to create a page where users are able to vote to go on with a project or not. I looked at ideas, but that doesn't cover it for us.

So I am trying to make it myself. I have made a custom object Vote with a master-detail towards projects.

People are also able to make comments without voting, however they are only allowed to vote once! This is where the problem hits.

There is a picklist vote__c with the options None, Yes, No. If that user has made an earlier entry Yes or No he/she must not be allowed to vote! So in this case a boolean Able-vote (or something) must be set to false. So I can use this in the apex code!

 

I have not much experience with custom controllers, hope to in the future.

 

Thanks

Jeroen

  • January 07, 2009
  • Like
  • 0
Hello,
 
I am having difficulties getting this to work. I just want the name of the person that created a record in my custom object Project_info__c. I have tried using a standard and a custom controller, since I am not doing much spectacular stuff I would rather stick to the standardcontroller for now.
 
<apex:outputtext value="{!Project_info__c.CreatedById.Lastname}"/>
 
Error: The class 'java.lang.String' does not have the property 'LastName'.
 
Other methode:
<apex:dataList value="{!Project_info__c.CreatedById}" var="r">
        {!r.FirstName}
</apex:dataList>
 
Same error...:smileysad:
 
Any ideas, Thanks
Jeroen:smileyvery-happy:
 
     We are having two Lists of check box groups which are displayed in two pageblocksections> our requirement is to display the two groups in two columns.The code is like this
                        <apex:pageblockSection title="Rules" columns="0">
                        <apex:selectCheckboxes value="{!selectedRules}">
                                <apex:selectOptions value="{!rules}"/><br/>
                        </apex:selectCheckboxes><br/>
                                   </apex:pageblockSection>
                       
                 <apex:pageblockSection title="Agents">
                    <apex:selectCheckboxes value="{!selectedAgents}">
                            <apex:selectOptions value="{!agents}"/><br/></p>
                    </apex:selectCheckboxes><br/></p>
                   </apex:pageblockSection>
    Could any one suggest on how to align these two as two columns in a pageblock?
 
 
 
 
 
 
  
Hi,

I need to add the field history from a custom object to a page, but am running into a lot of problems.  The related list displays with no problem when viewing the custom object through the salesforce custom object tab, but on my custom page it says that Histories is not a valid child relationship name for the entity.  I have checked the child relationships of my custom object and the History object that salesforce generates automatically when "Track Field History" is checked is listed with the name "Histories" as the child relationship name.  I have tried this on multiple custom objects (making them as simple as possible) and a relatedList on Histories just doesn't seem to be possible.  Has anyone been able to make this work?

-David
Hello,

I am trying to have a tab apear if the status of object project is ok (pickval).
I can't get it to work, I have looked everywhere

 <apex:tab label="Stem" name="Stem" id="tabStem" rendered= "{!IF ((Project__c.Status__c = "ok"),"True","False")}">

Error that is generated:
Error: Syntax error. Missing ')'

I am sure that the syntax is right. It also doesn't work if I do

<apex:tab label="Stem" name="Stem" id="tabStem" rendered= "{!IF (CONTAINS(Project__c.Status__c , "ok"),"True","False")}">

Anybody any ideas?
Thanks:smileyhappy:
Jeroen



  • July 15, 2008
  • Like
  • 0
I'm recreating a detail page and I'm trying to add some related lists that are currently displayed on the existing page.  I'm unable to figure out what the list names are supposed to be though.  The names that are used in the pagelayout editor are not working.  Some example list are "Notes & Attachments", "Approval History", and "Activity History".  How do you find out the names to use in visual force for related lists?
Alright, here's another one.
I am making a visualforce page that displays data from a custom object and its two related lists. I successfully used the <apex:relatedlist> tag by setting the list="MonitoringContacts__r" which is how you specify a Child Relationship Name.
While it worked, the rendered result maintained Salesforce's look and feel which is what i am trying to avoid here.
What I want is a list of data from a related list, but i want to control what the final product looks like. So I settled on a DataTable. This is the code I used to render a DataTable containing Related List info, using the Child Relationship naming convention mentioned earlier (I only have one column here for simplicity)

Code:
<apex:datatable value="{!Monitoring_Agreement__c.MonitoringContacts__r}" var="Contact">
      <apex:facet name="caption">table caption</apex:facet>
      <apex:facet name="header">table header</apex:facet>
      <apex:facet name="footer">table footer</apex:facet>
            <apex:column>
                  <apex:facet name="header">Password</apex:facet>
                  <apex:facet name="footer">column footer</apex:facet>
                  <apex:outputText value="{!Monitoring_Agreement__c.MonitoringContacts__r.password__c}"/>
            </apex:column>
</apex:datatable>    

 
Most of this is apparently right because I only get an error for the last part, the part where I set the OutputText value="{!Monitoring_Agreement__c.MonitoringContacts__r.password__c}"
The error I get is:

ErrorError: The class 'java.util.ArrayList' does not have the property 'password__c'.

I have gotten this error before, so I must be misunderstanding something.

What i am looking for from you guys and gals is
  1. How do I display a Related List in a DataTable?
  2. How do I specify elements of an ArrayList so as to avoid the above error?
Thanks in advance....
Ok, I've read a dozen threads and all the documentation I can find but still can't seem to get the gist of how to save objects to Salesforce. I etiher end up receiving insufficient coverage messages or the items just don't seem to save anyway. Somehow, I managed to save a trigger and its test class to Salesforce yesterday. Today, I tried adding another class and trigger but the coverage errors were blocking me. The new class kept validating against the old trigger and not the new one. I then deleted all my objects to get a fresh start (I saved the code in local text files first). Now, when I try to save items, they don't get saved in Salesforce but there is no "only saved locally" message.

Can someone please give me a step-by-step list of how I go about creating Apex Triggers/Classes and saving them to SF through Eclipse? In my scenario, I am trying to create two triggers (on different objects). One of the triggers will be calling a method from another class.

I'm using Eclipse 3.3.1.1 and the Apex Toolkit 8.1.0.200710161138 (not using Force.com due to rollbackOnError issue). Also, I am using the Enterprise Edition of Salesforce.

UPDATE: I have finally gotten both triggers onto Salesforce. I had to use a single class for all my methods. Within this class, I created a single testMethod that runs tests against all objects.  My new issue is getting updates saved. When I modify my code and save it, it does not seem to get pushed out to Salesforce. Any thoughts?


Message Edited by MikeD13 on 01-16-2008 02:08 PM