Thursday, 12 December 2013

Disabiling developer mode using code

Code to Disable Developer mode in visualforce pages:

visualforce code :

<apex:page controller="newclass">
<apex:form >
 <apex:commandButton value="next" action="{!save}"/>
</apex:form>
</apex:page>

Apex Code :

public with sharing class newclass {
    public PageReference save() {
        PageReference pr = new PageReference('https://c.ap1.visual.force.com/apex/test1'+'?isdtp=vw');
        return pr;
    }
}

                                                            ---  OR ---

Append the following code to the URL

For example :

https://c.ap1.visual.force.com/apex/test?isdtp=vw

No comments:

Post a Comment