• John Da
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 3
    Replies
Hi,

I have a query as below:
Select fieldA, fieldB from object_X__c where fieldA = true and fieldB = true Order By ...

I want to return in the order such that the results that satisfies fieldA to go first, and the result that satisfies fieldB to go next. Thanks.
I need to redirect a standard record deatail page layout to a VF page that I built. The standard detail page link is referenced from an email notification, but we want the link to redirect to a VF page (but we do not have access to the email notification). Any guide would be appreciated.

Thanks.
  • September 30, 2015
  • Like
  • 0

Hi all,

I created a button of object A, and this button opens to a VF page. I added this button to the related list of object B. When I clicked on this button from the page layout of object B, it loads up the VF page and this URL:

https://domain.salesforce.com/apex/VFPageName?retURL=%2FRECORD_ID&wrapMassAction=1&scontrolCaching=1&id=RECORD_ID

(where RECORD_ID is the actual record ID, a 15 digit ID)

So I'm writing some code to get the record ID from the URL, by doing ApexPages.currentPage().getParameters().get('Id')

My question is can I rely on this "ID" parameter, that it will always show up on the URL? Or should I rely on retURL? Thanks.

I want to go to a standard page layout (new record edit mode) from clicking on a button in a VF page. I got this to work by using onClick and adding a script in there with the URL of the page I want to go to. Can this be achieved using PageReference (redirect)? Thanks.
Hi,

So I have object A with 2 record types. Whenever I click on "New" button (from related list), it goes to the standard page layout with the recordtype option for me to choose. Then depending on which recordtype I choose, it will go to the correct page layout for that recordtype. for editing. Now I want to override that standard page for record type selection with a VisualForce page. I will have 2 buttons on that page, each for 1 record type. Whichever button I click on, it is supposed to go to the correct page layout for editing. How can I achieve this? 
Hi all,

I am using Apex Repeat to get all the children objects of a parent object and print out their fields values. Apex OutputText does not respect new line characters for a Text Area field, so I had to write a split function in the controller to cut the text by line break characters.

The issue is that it goes down a new line but does not align with the previous text in the same field. So it will be like this:

1. Goals for this year: * Complete all training
* Sell more goods
* Get customer's feedback

("Sell more goods" and "get customer's feedback" should be indented to right below "Complete all training").

This is Apex Repeat's getting data and "complete all training .... feedback" is 1 field data, so I don't know how to put indentation in this scenario. Any suggesstions or help will be appreciated.
Hi,

So in my page layout, I have a related list (child object) that is sorted by "priority" variable. When I create a PDF VisualForce page, I use apex:repeat to loop through that relaled list and display all the records. It works fine and all, except the order of this apex:repeat is the order of when the record is creaed (not the order of priority). Is there a way I can use apex:repeat to have the same order as the page layout (sorted by Priority)? Can this be done without Apex (right now I just use a Standard Controller)? Thanks.
Hi,

So in my page layout, I have a related list (child object) that is sorted by "priority" variable. When I create a PDF VisualForce page, I use apex:repeat to loop through that relaled list and display all the records. It works fine and all, except the order of this apex:repeat is the order of when the record is creaed (not the order of priority). Is there a way I can use apex:repeat to have the same order as the page layout (sorted by Priority)? Can this be done without Apex (right now I just use a Standard Controller)? Thanks.
I need to redirect a standard record deatail page layout to a VF page that I built. The standard detail page link is referenced from an email notification, but we want the link to redirect to a VF page (but we do not have access to the email notification). Any guide would be appreciated.

Thanks.
  • September 30, 2015
  • Like
  • 0
I want to go to a standard page layout (new record edit mode) from clicking on a button in a VF page. I got this to work by using onClick and adding a script in there with the URL of the page I want to go to. Can this be achieved using PageReference (redirect)? Thanks.
Hi all,

I am using Apex Repeat to get all the children objects of a parent object and print out their fields values. Apex OutputText does not respect new line characters for a Text Area field, so I had to write a split function in the controller to cut the text by line break characters.

The issue is that it goes down a new line but does not align with the previous text in the same field. So it will be like this:

1. Goals for this year: * Complete all training
* Sell more goods
* Get customer's feedback

("Sell more goods" and "get customer's feedback" should be indented to right below "Complete all training").

This is Apex Repeat's getting data and "complete all training .... feedback" is 1 field data, so I don't know how to put indentation in this scenario. Any suggesstions or help will be appreciated.