• Shailendra Soni 10
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi All,

I have Created a Custom object and over-ridden New and Edit Button by a Custom VF page.

Below are my queries :
1. On Click on new i am getting my VF page but without side bar..!!(which is fine with my requirement).
2. on click of save(on detail page), records get saved but again side bars are not coming. (which i wanted..)
3. on click of edit, VF page is opening with the information prepopulated but again side bars are not coming. (which i wanted..)

Screen shot :
Create page : 
User-added image

2.Detail Page : I want the side bar on this page.
User-added image

Problem : 
If I Open the same record by going back to the List view of Object then the side bars are coming on detail as well as on edit page .
Screenshot :
User-added image
 

Please suggest a wayaround how to accomplish this..?
i have searched every where on Web but didnt get any solution for it..
Any help will be much Appreciated...!!!!!
Thanks a lot in advance...!!!
Hi All,

Below are my requirements: 
I have  a VF page with a standard controller for custom object to create new record. This page is controlled by another VF page which checks on Profile. if the profile is "XXX" it will redirect to this VF page else standard page will open.

Now, i have over ridden New and Edit button with redirecting VF page.
The functionality is working fine for New..!!
But i am not getting any pre populated field value in case of Edit.:(

on click of edit am getting all the value's in my instance of a object in getter setter through """.getRecord();""
but i dont understand why they are not appearing on the UI....:(


below is the piece of code:

    $(document).ready(function(){
        var user = "{!$Profile.Name}";
        var prost = "{!pros.ID}";
        alert('Prospect----->ID'+prost);  
        if(user == 'Agent'/*|| ){
           console.log(' Agent profile');
           if (sforce.console.isInConsole()) {
               sforce.console.getEnclosingPrimaryTabId(closeSubtab);
              // alert(sforce.console.getEnclosingPrimaryTabId());
               sforce.console.openPrimaryTab(null, 'apex/ProspPage', true, 'Prosp VF Page');
                                                   
           }

i have tried passing the ID in the URL of openPrimaryTab but its still not working..:(

Please Help...!!!!!