function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shailendra Soni 10Shailendra Soni 10 

Custom Edit VF Page..!!!

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...!!!!!
 
Austin MuellerAustin Mueller
What does your visualforce page code look like?