• JR Nonprofit
  • NEWBIE
  • 35 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 7
    Replies
Is there a way to insert rows into the activity history?  When I try to do so within my Apex code I get an error message: DML not allows on Activity History.
 
Thanks for your help.
I noticed last night that I now have duplicate page layouts for all page layouts (custom or standard) in my system.  All of the duplicates have exactly the same name and date (10/15/2008 2:52 PM). 
 
Does anyone have any idea of what's going on with this?
I'm displaying a detail page for a custom object on a visual force page.  I have displayed the standard delete button on the detail page and have added a custom delete button on the detail page as well (I know that sounds dumb, but I'm doing some testing).
 
At any rate, when I click the standard delete button, the record is properly deleted.   When I press the custom delete button, a visual force page is loaded which uses a custom controller (I've tried a controller extension as well and the behavior is the same).  If its not OK to delete the page, I display an error message explaining the problem.  If its OK to delete the page, I issue a "delete record" line in the apex controller and get a "DML currently not allowed" page.
 
Anybody know what's going on here?
 
Thanks for your help,
Jeff
 
I'm getting some strange behavior on a visual force page that I can't explain.
 
I have created a custom object. I have the profile of the user set to disallow editing for that object.  When I look at my object using the standard page layout, I can't edit anything, which is the behavior I would expect.  But when I create a visual force page with a custom controller, I can't edit anything there either.  The page appears, but none of the fields are editable (using inputField).  I thought that custom controllers ignored profile based security unless certain explicit measures were taken.  I am using the visual force page because I want to control security on this object in a customized manner.  Any suggestions on what I might be doing wrong?
 
If I change the profile security to allow editing and turn on in line editing in the user interface, the in line editing does not work on a visual force page (using InputField).  Any ideas on what might be going on here?
 
Thanks in advance for your help,
Jeff
 
I am working with the sample code in the Apex manual dealing with the selectoptions class on pages 187-189 in the Apex reference guide.  I am trying to add something to this code from the guide:
 

public class sampleCon {

String[] countries = new String[]{};

public PageReference test() {

return null;

}

public List<SelectOption> getItems() {

List<SelectOption> options = new List<SelectOption>();

options.add(new SelectOption('US','US'));

options.add(new SelectOption('CANADA','Canada'));

options.add(new SelectOption('MEXICO','Mexico'));

return options;

}

public String[] getCountries() {

return countries;

}

public void setCountries(String[] countries) {

this.countries = countries;

}

}

Using the examples, I have no problem displaying on the page the values of the items checked.

However, I am trying to extract the values via code in the controller from the selectoptions that have been checked.  I think this is possible in the getCountries() method, but I can't seem to figure out how to do it.  Is it possible for someone to help me with the couple of lines of code necessary to make this happen?

Thanks for your help.

 

T

 

I am working with the sample code in the Apex manual dealing with the selectoptions class on pages 187-189 in the Apex reference

I have several objects linked to the account object.  When I display their list views, I have check boxes next to the rows on one of the lists.  What did I do to get the check boxes displayed and how can they be removed?
 
Additionally, I am trying to very closely control the editing of one of the objects and would like to eliminate the edit and delete links next to the rows.  Is it possible to keep these two action links from displaying?
 
Thanks in advance for your help.
I am trying to populate a datatable (or pageblocktable) in force.com and can't seem to get the controller right.  I am using a custom controller and am trying to get opportunities to display in the table on my visual force page.  I think I have the table correct in my page code since I can get it to display correctly if I set up the soql code to retrieve only one row.  But if I need to display multiple rows, I can't seem to get the variable right.  I'm new at this and it seems that my variable set ups are not correct.
 
My code looks something like this:
 
public class MyController {
    
    Opportunity opportunity;
    
    
    public opportunity getOpenOpportunities(){
        for (opportunity: [select amount, closeDate, id, name, stagename from Opportunity where accountId=:ApexPages.currentPage().getparameters().get('accid') and isClosed=FALSE])
        {
        return opportunity;
        }
    }
This code returns an error indicating an invalid loop variable declaration.  Can anyone tell me how to fix this?
 
Thanks for your help.
 
While using visual force, is there an equivalent to the "apex:detail" component tag or some attribute that I can use that will allow me to display an input page instead of a detail page?
 
I'd like to use the page layout of data as designed by the user from within a visual force page layout that I have designed rather than using individual input fields.
 
Thanks in advance for your help,
Jeff
 
I have set my organisation up for person accounts.  When I set up a report type and select account as the primary object, none of the contact fields appear to be available in the report unless I make contacts the first related object.  Unfortunately, then I don't have access to anything in other objects which are related directly to the account.
 
What can I do to make the contact fields available together with the account fields as per the intent of the person account?
Hello,

This might be not pure VF development question, but still...

I have  a Visualforce page that uses custom controller
Visualforce page name: myVFpage

Opportunity Page layout has a button with the following URL:

/apex/myVFPage?id={!Opportunity.Id}

That is calling the VF page and passing Opportunity Id as a parameter.
Everything works fine in my developer org.
-------------------------------------------------------------------------------------------------------------------------------------------------
Now, the problem comes when I create a managed package (managed-beta) and install it in a destination org.
When I press the button I get an error message:

'Page myvfpage does not exist'.

However, if I enter the following URL directly into a browser, the page shows up:
https://my_namespace_prefix.na6.visual.force.com/apex/myVFPage?id=0068000000MLQE6

What am I doing wrong?
I guess this is somehow related to a namespace prefix.
  • November 21, 2008
  • Like
  • 0
I'm displaying a detail page for a custom object on a visual force page.  I have displayed the standard delete button on the detail page and have added a custom delete button on the detail page as well (I know that sounds dumb, but I'm doing some testing).
 
At any rate, when I click the standard delete button, the record is properly deleted.   When I press the custom delete button, a visual force page is loaded which uses a custom controller (I've tried a controller extension as well and the behavior is the same).  If its not OK to delete the page, I display an error message explaining the problem.  If its OK to delete the page, I issue a "delete record" line in the apex controller and get a "DML currently not allowed" page.
 
Anybody know what's going on here?
 
Thanks for your help,
Jeff
 
I'm getting some strange behavior on a visual force page that I can't explain.
 
I have created a custom object. I have the profile of the user set to disallow editing for that object.  When I look at my object using the standard page layout, I can't edit anything, which is the behavior I would expect.  But when I create a visual force page with a custom controller, I can't edit anything there either.  The page appears, but none of the fields are editable (using inputField).  I thought that custom controllers ignored profile based security unless certain explicit measures were taken.  I am using the visual force page because I want to control security on this object in a customized manner.  Any suggestions on what I might be doing wrong?
 
If I change the profile security to allow editing and turn on in line editing in the user interface, the in line editing does not work on a visual force page (using InputField).  Any ideas on what might be going on here?
 
Thanks in advance for your help,
Jeff
 
I am trying to populate a datatable (or pageblocktable) in force.com and can't seem to get the controller right.  I am using a custom controller and am trying to get opportunities to display in the table on my visual force page.  I think I have the table correct in my page code since I can get it to display correctly if I set up the soql code to retrieve only one row.  But if I need to display multiple rows, I can't seem to get the variable right.  I'm new at this and it seems that my variable set ups are not correct.
 
My code looks something like this:
 
public class MyController {
    
    Opportunity opportunity;
    
    
    public opportunity getOpenOpportunities(){
        for (opportunity: [select amount, closeDate, id, name, stagename from Opportunity where accountId=:ApexPages.currentPage().getparameters().get('accid') and isClosed=FALSE])
        {
        return opportunity;
        }
    }
This code returns an error indicating an invalid loop variable declaration.  Can anyone tell me how to fix this?
 
Thanks for your help.
 
While using visual force, is there an equivalent to the "apex:detail" component tag or some attribute that I can use that will allow me to display an input page instead of a detail page?
 
I'd like to use the page layout of data as designed by the user from within a visual force page layout that I have designed rather than using individual input fields.
 
Thanks in advance for your help,
Jeff
 
I have set my organisation up for person accounts.  When I set up a report type and select account as the primary object, none of the contact fields appear to be available in the report unless I make contacts the first related object.  Unfortunately, then I don't have access to anything in other objects which are related directly to the account.
 
What can I do to make the contact fields available together with the account fields as per the intent of the person account?