• Technossus Developer
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Please point out  what I am doing wrong

 

<apex:page Controller="EmployeeDemo" >
  <apex:form >
  <h1>Congratulations</h1>
  This is your new Page: ForDocument
  <Apex:pageBlock >
  <apex:inputField value="{!objEmployee.Employee_Name__c}"/>
  <apex:pageBlockSection >
<apex:commandButton Action="{!Save}" Value="Save" />
</apex:pageBlockSection>
   </Apex:pageBlock>
  </apex:form>
 </apex:page>

 

public with sharing class EmployeeDemo
{

    public EmployeeDemo()
    {
     objEmployee= new Employee__c();
    }

    public Employee__c objEmployee {get;set;}
   
    public  PageReference Save()
    {
        try
        {
            Insert objEmployee;
        }
        catch(Exception ex)
        {    
            System.debug('\n\nException ='+ex.getMessage()+'\n\n');
        }
        return null; 
    }
}

 

Regards

Ambivert

Hi all,

 

As usual I am here with a new  issue...  I was just  thinking can we  generate the PDF by Apex code, no doubt we Can an I got the success and able redirect my page to anothet page whic is PDF,, but the problem is after generation of PDF we lost the controle to the salesforce UI, means no  tab, no address bar, no left pane menu nothing we got just whole PDF  only like that.. So I want to know is there any way so that I will redirect to another page as PDF but controle should not be loss as any normal VF page shows...  

 

Regards

Raman

Please point out  what I am doing wrong

 

<apex:page Controller="EmployeeDemo" >
  <apex:form >
  <h1>Congratulations</h1>
  This is your new Page: ForDocument
  <Apex:pageBlock >
  <apex:inputField value="{!objEmployee.Employee_Name__c}"/>
  <apex:pageBlockSection >
<apex:commandButton Action="{!Save}" Value="Save" />
</apex:pageBlockSection>
   </Apex:pageBlock>
  </apex:form>
 </apex:page>

 

public with sharing class EmployeeDemo
{

    public EmployeeDemo()
    {
     objEmployee= new Employee__c();
    }

    public Employee__c objEmployee {get;set;}
   
    public  PageReference Save()
    {
        try
        {
            Insert objEmployee;
        }
        catch(Exception ex)
        {    
            System.debug('\n\nException ='+ex.getMessage()+'\n\n');
        }
        return null; 
    }
}

 

Regards

Ambivert

Hi all,

 

As usual I am here with a new  issue...  I was just  thinking can we  generate the PDF by Apex code, no doubt we Can an I got the success and able redirect my page to anothet page whic is PDF,, but the problem is after generation of PDF we lost the controle to the salesforce UI, means no  tab, no address bar, no left pane menu nothing we got just whole PDF  only like that.. So I want to know is there any way so that I will redirect to another page as PDF but controle should not be loss as any normal VF page shows...  

 

Regards

Raman