• Praveen.K
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi All.

 

I have created a visualforce page using standard controller with extentions...

When i save the page the field values are not saving..

 

I need to pass the values from the visualforce page to apex class without using set and get methods..

 

Here is my visualforce page code...

 

<apex:page standardController="case" extensions="CasePrvaeenClass">

<apex:form >

<apex:pageBlock title="Case Edit" >

<apex:pageBlockSection title="Case Information">
<apex:outputField value="{!Case.CaseOwner_del__c}" id="owner"/>

<apex:inputField value="{!case.status}" id="status"/>

<apex:inputField value="{!case.priority}" id="prority"/>

<apex:inputField value="{!case.type}" id="type"/>

<apex:inputField value="{!case.origin}" id="origin"/>

<apex:inputField value="{!case.contactid}" id="contactid"/>

<apex:inputField value="{!case.Submitted__c}" id="submittedby"/>

</apex:pageBlockSection>

</apex:form>

</apex:page>

 

 

Apex class extentions code:

 

 

public with sharing class CasePrvaeenClass

{
public CasePrvaeenClass(ApexPages.StandardController controller)

{

}       

public pagereference Save()   

{   

case cobj= new case();   

cobj.ownerid='00G30000002dfDG';   

cobj.status=ApexPages.currentPage().getParameters().get('case.status');   

cobj.priority=ApexPages.currentPage().getParameters().get('case.priority');   

cobj.type=ApexPages.currentPage().getParameters().get('type');   

cobj.origin=ApexPages.currentPage().getParameters().get('origin');   

cobj.ContactId=ApexPages.currentPage().getParameters().get('contactid'); 

cobj.RecordTypeid='01230000000ntOj';   

cobj.subject=string.valueof(ApexPages.currentPage().getParameters().get('subject'));   

cobj.description=ApexPages.currentPage().getParameters().get('description');      

system.debug(cobj.status=ApexPages.currentPage().getParameters().get('status'));
system.debug(cobj.status=ApexPages.currentPage().getParameters().get('priority'));
    insert cobj;   

return (new pagereference('/'+cobj.id));        

 }         
}

 

 

Now i need to pass the parameters from visualforce page to apex class without using get and set methods...

 

Please suggest me how do this....

 

Thanks in advance....

Praveen K

 

 

 

Hi All ,

 

Please look forward on to my requirement...

 

I need to assign the Case Owner ( Standard field ) value to a default value from the queue, for this i used workflow rule.

 

But with workflow rule field update action it is updating after the page is submitted, i need this case owner field sholud be defaulted before submitting that is when the page gets loaded.

 

Please share your ideas on this requirement.

 

Thanks,

Praveen K

Hi All,

 

I am trying to set a field to a default value, if i take a text field and assign it to some default value but it can be editable, I want the field to set as default and it cant be editable...

 

Please give me some suggestions to do this...

 

Its urgent.....

 

Thanks in advance..

 

Praveen K.