• bev90210
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hey community!
 
Easy question.
 
1. I have a visualforce page that is an edit page
2. I override both the edit and new standard buttons so that they go to this page.
 
Use Case
a) I am in the list view to show many records of my object
b) I click on the "New" standard button to create a new record, it goes to this page:
https://na2.salesforce.com/a05/e?retURL=%2Fa05%2Fo
c) I add data and click save.
d) PROBLEM: After the save it takes me to the list view, not the newly created records detail view.
 
I can see by the URL that the retURL will throw me back to the list view, not the detail view, but why this behavior? How do I override it if possible or account for it?
 
Thanks and do let me know if you need more clarity.
 
Appreciate in advance!
 
 


Message Edited by bev90210 on 10-09-2008 06:49 PM

Message Edited by bev90210 on 10-09-2008 06:50 PM
Hi there,
 
Hope all is well VF dev team and developers!
 
I was hoping you guys could assist me in determining what the date/time format is used on the particular SFDC instance.
 
For example, on my instance (like many) dates are in the M/DD/YYYY format, I would like to know this so that I can parse the month or day and it be a global function that works with Canadian and those pesky Euro instances where the date/time format is no doubt different.
 
Is there a "{$x.xxx}" value I could pull in my VF page or maybe a function within the SFDC js files that can return such a format?
 
Any help here would be greatly appreciated as always.
 
 
Hi there,
 
I am trying to make a field read-only and would like to do this in the javascript of the page when it loads. I try using the intructions in the VF developer guide with no luck, anyone have an idea? Thanks in advance.
 
Code:
<script>
function atload() 
{

//This line does NOT work
//var ba = document.getElementById('{!$component.sprinknum}');

//This line works, but not very elegant syntax
var ba = document.getElementById("j_id0:j_id3:thePageBlock:j_id53:sprinknum");

ba.readOnly = true;
}
window.onload=atload;

</script>


<*****Valid Visualforce/apex code here>

<apex:inputField id="sprinknum" value="{!Sprinkles__c.Sprinkles_Number__c}"/>  

<*****Valid Visualforce/apex code here>

 
Hey community!
 
Easy question.
 
1. I have a visualforce page that is an edit page
2. I override both the edit and new standard buttons so that they go to this page.
 
Use Case
a) I am in the list view to show many records of my object
b) I click on the "New" standard button to create a new record, it goes to this page:
https://na2.salesforce.com/a05/e?retURL=%2Fa05%2Fo
c) I add data and click save.
d) PROBLEM: After the save it takes me to the list view, not the newly created records detail view.
 
I can see by the URL that the retURL will throw me back to the list view, not the detail view, but why this behavior? How do I override it if possible or account for it?
 
Thanks and do let me know if you need more clarity.
 
Appreciate in advance!
 
 


Message Edited by bev90210 on 10-09-2008 06:49 PM

Message Edited by bev90210 on 10-09-2008 06:50 PM
Hi there,
 
I am trying to make a field read-only and would like to do this in the javascript of the page when it loads. I try using the intructions in the VF developer guide with no luck, anyone have an idea? Thanks in advance.
 
Code:
<script>
function atload() 
{

//This line does NOT work
//var ba = document.getElementById('{!$component.sprinknum}');

//This line works, but not very elegant syntax
var ba = document.getElementById("j_id0:j_id3:thePageBlock:j_id53:sprinknum");

ba.readOnly = true;
}
window.onload=atload;

</script>


<*****Valid Visualforce/apex code here>

<apex:inputField id="sprinknum" value="{!Sprinkles__c.Sprinkles_Number__c}"/>  

<*****Valid Visualforce/apex code here>

 
I am trying to find alternative ways to make sure my visualforce pages can be included in an application.  I have come across the object ApexPage in the webservices API that I have been attempting to use in a custom button.  I was getting some problems with setting the markup to this new page but I got around this by returning the markup from an apex class as a string and setting this as the markup.

Now, I was wondering if anyone has come across any solutions that are more automatic.  For instance, some way of creating the visualforce page when the package has been downloaded/deployed?