• prathap pendem
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 6
    Replies

Hi.

 

I need to focus the fields when i press the tab , and tab key should follow the order that means

 

first it should go through the fields and should come to the buttons.

 

After the buttons, it should repeat (i.e) from first focused field

 

Can anybody plz solve this?

 

Here is my code, and i also tried with tabindex and Taborderhint attributes

 

 

<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!CSave}" onclick="pbr()"  tabindex="10"/>
<apex:commandButton value="Save & Next" action="{!nextTab1}" reRender="TabPanel"  tabindex="11"/>
<apex:commandButton value="Save & Exit" action="{!FSave}"  tabindex="12"/>
<apex:commandButton value="Cancel" action="{!Cancel}"  tabindex="13"/>
</apex:pageBlockButtons> <apex:pageMessages />
<apex:actionFunction name="accchange" action="{!autoPopulate}" reRender="Address" />

<apex:pageblockSection columns="2" collapsible="false" >
<apex:inputField value="{!E.EAA_Account__c}" label="Account" onchange="accchange()" taborderhint="1"/>
<apex:outputText value="{!EAid}" label="Energy Audit Id" />
<apex:outputText />
<apex:inputField value="{!E.EAA_Audit_Status__c}" style="width:50%" taborderhint="2"/>
</apex:pageblockSection>
<apex:pageblockSection columns="1" collapsible="false" id="Address">
<apex:inputField value="{!E.EAA_Address_Line_1__c}" label="Street Address" style="width:25%" taborderhint="3"/>
<apex:inputField value="{!E.EAA_City__c}" style="width:25%" taborderhint="4"/>
<apex:inputField value="{!E.EAA_State__c}" style="width:25%" taborderhint="5"/>
<apex:inputField value="{!E.EAA_Zip__c}" style="width:25%" taborderhint="6"/>
<apex:inputField value="{!E.EAA_Country__c}" style="width:25%" taborderhint="7"/>
</apex:pageblockSection>


<apex:pageblockSection columns="1" collapsible="false" >
<apex:inputField value="{!E.EAA_Notes__c}" style="width:100%" taborderhint="8"/>
<apex:inputField value="{!E.EAA_Property_Image__c}" style="height:75%" taborderhint="9" />
</apex:pageblockSection>
</apex:pageBlock>

 

 

 

 

Thanks:

HI,

Can you solve this issue, plese write the test class if you r zenious

 

 

 

 

 

public class convertcntrl {

public quote qt;

public list<quotelineitem> qli;
public sales_order__c ord;
public list<sales_order__c> ordl;
public invoice__c inv;
public list<invoice__c> invl;
public Sales_Order_Line_Item__c sli;
public Invoice_Line_Items__c ili;
public delivery_order__c dlv;
public delivery_order_line_item__c dli;
public list<delivery_order__c> dlvl;
public Boolean check{get;set;}
public Boolean check2{get;set;}
public Boolean check3{get;set;}
public Boolean disable{get;set;}


public void doDisable(){
if(check == true){
disable = true;
check2 = false;
check3 = false;
}else
disable = false;
}
public void doDisable2(){
if(check2 == true){
disable = true;
check = false;
check3 = false;
}else
disable = false;
}
public void doDisable3(){
if(check3== true ){
disable= true;
check2= false;
check = false;
}else
disable = false;
}



public convertcntrl(ApexPages.StandardController controller) {
this.qt = (quote)controller.getRecord();
}

public pageReference doCreateOpportunity() {


ord = new sales_order__c();
inv = new invoice__c();
sli = new Sales_Order_Line_Item__c();
ili = new Invoice_Line_Items__c();
dlv = new delivery_order__c();
dli = new delivery_order_line_item__c();

qt = [select Id, Name,Email, Status, Contactid, Description, opportunityid,Tax_Amount__c,Total_Quote_amount__c, opportunity.accountid,
Tax__c, ShippingHandling, phone, fax,BillingName, Billingcity, Billingstreet, Billingcountry, BillingState, BillingPostalCode,
ShippingName,shippingcity, shippingstreet, shippingcountry, shippingState, shippingPostalCode,Terms__c,CurrencyIsoCode
from quote where id = :qt.id];
qli = [select Id,ServiceDate,Discount,Description, ListPrice, Quantity , Quoteid, Subtotal,
TotalPrice,UnitPrice, priceBookEntry.product2id, priceBookEntry.product2.CurrencyIsoCode
from quotelineitem where quoteid = :qt.id];
ordl= [ select id, name from sales_order__c where quote__c =: qt.id];
invl= [ select id, name from invoice__c where quote__c = : qt.id];
dlvl= [ select id, name from delivery_order__c where quote__c = : qt.id];
// add your field mappings here
if(check2 == TRUE){
ord.subject__c = qt.name;
ord.Account_Name__c = qt.opportunity.accountid;
ord.quote__c = qt.id;
ord.Contact_Name__c = qt.Contactid;
ord.status__c=qt.status;
ord.tax__c=qt.Tax__c;
ord.ShippingHandling__c=qt.ShippingHandling;
ord.fax__c=qt.fax;
ord.phone__c=qt.phone;
ord.email__c=qt.email;
ord.Description__c = qt.description;
ord.opportunity__c=qt.opportunityid;
ord.billing_city__c=qt.billingcity;
ord.bill_to_name__c=qt.billingname;
ord.billing_country__c=qt.billingcountry;
ord.billing_state__c=qt.billingstate;
ord.billing_street__c=qt.billingstreet;
ord.billing_code__c=qt.billingPostalCode;
ord.shipping_city__c=qt.shippingcity;
ord.ship_to_name__c=qt.shippingname;
ord.shipping_country__c=qt.shippingcountry;
ord.shipping_state__c=qt.shippingstate;
ord.shipping_street__c=qt.shippingstreet;
ord.shipping_code__c=qt.shippingPostalCode;
ord.Terms_and_Conditionss__c=qt.Terms__c;
ord.CurrencyIsoCode =qt.CurrencyIsoCode ;


if(ordl.size() == 0)
{
insert ord;
}else
{ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'quote already converted'));
Return null;}
for(quotelineitem ql:qli){
sli = new Sales_Order_Line_Item__c(Date__c =ql.ServiceDate,list_price__c=ql.ListPrice,
CurrencyIsoCode=ql.priceBookEntry.product2.CurrencyIsoCode,Sales_Order__c=ord.id,
product__c=ql.priceBookEntry.product2id, Quantity__c=ql.quantity,
Sales_Price__c=ql.UnitPrice, discount__c=ql.discount,
Line_Item_Description__c=ql.Description);

insert sli;
}


pageReference q = new pageReference('/' + ord.id );
q.setRedirect(true);
return q;

}
if(check == TRUE){

inv.subject__c = qt.name;
inv.quote__c = qt.id;
//inv.sales_order__c = ord.id;
inv.Account_Name__c = qt.opportunity.accountid;
inv.opportunity__c=qt.opportunityid;
inv.Contact_Name__c = qt.Contactid;
inv.Description__c = qt.description;
inv.status__c=qt.status;
inv.tax__c=qt.tax__c;
inv.ShippingHandling__c=qt.ShippingHandling;
inv.fax__c=qt.fax;
inv.phone__c=qt.phone;
inv.email__c=qt.email;
inv.bill_to_name__c=qt.billingname;
inv.billing_city__c=qt.billingcity;
inv.billing_country__c=qt.billingcountry;
inv.billing_state__c=qt.billingstate;
inv.billing_street__c=qt.billingstreet;
inv.billing_code__c=qt.billingPostalCode;
inv.ship_to_name__c=qt.shippingname;
inv.shipping_city__c=qt.shippingcity;
inv.shipping_country__c=qt.shippingcountry;
inv.shipping_state__c=qt.shippingstate;
inv.shipping_street__c=qt.shippingstreet;
inv.shipping_code__c=qt.shippingPostalCode;
inv.Terms_and_Conditionss__c=qt.Terms__c;
inv.CurrencyIsoCode =qt.CurrencyIsoCode ;

if(invl.size()==0)
{
insert inv;
}else
{ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'quote already converted'));
Return null;}

for(quotelineitem ql:qli){
ili = new Invoice_Line_Items__c(Date__c =ql.ServiceDate,list_price__c=ql.ListPrice, invoice__c=inv.id,
CurrencyIsoCode=ql.priceBookEntry.product2.CurrencyIsoCode,
product__c=ql.priceBookEntry.product2id, Quantity__c=ql.quantity,
Sales_Price__c=ql.UnitPrice, discount__c=ql.discount,
Line_Item_Description__c=ql.Description );

insert ili;

}
pageReference q = new pageReference('/' + inv.id );
q.setRedirect(true);
return q;

}
if (check3==true)
{
dlv.subject__c = qt.name;
dlv.quote__c = qt.id;
//inv.sales_order__c = ord.id;
dlv.Account__c = qt.opportunity.accountid;
dlv.opportunity__c=qt.opportunityid;
dlv.Contact_Name__c = qt.Contactid;
dlv.Description__c = qt.description;
dlv.status__c=qt.status;
dlv.tax__c=qt.tax__c;
dlv.ShippingHandling__c=qt.ShippingHandling;
dlv.fax__c=qt.fax;
dlv.phone__c=qt.phone;
dlv.email__c=qt.email;
dlv.bill_to_name__c=qt.billingname;
dlv.billing_city__c=qt.billingcity;
dlv.billing_country__c=qt.billingcountry;
dlv.billing_state__c=qt.billingstate;
dlv.billing_street__c=qt.billingstreet;
dlv.billing_code__c=qt.billingPostalCode;
dlv.ship_to_name__c=qt.shippingname;
dlv.shipping_city__c=qt.shippingcity;
dlv.shipping_country__c=qt.shippingcountry;
dlv.shipping_state__c=qt.shippingstate;
dlv.shipping_street__c=qt.shippingstreet;
dlv.shipping_code__c=qt.shippingPostalCode;
dlv.Terms_and_Conditionss__c=qt.Terms__c;
dlv.CurrencyIsoCode =qt.CurrencyIsoCode ;
if(dlvl.size()==0){
insert dlv;
}
else{ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'quote already converted'));
Return null;}


for(quotelineitem ql:qli){
dli = new delivery_Order_Line_Item__c(Date__c =ql.ServiceDate,list_price__c=ql.ListPrice,
CurrencyIsoCode=ql.priceBookEntry.product2.CurrencyIsoCode,delivery_Order__c=dlv.id,
product__c=ql.priceBookEntry.product2id, Quantity__c=ql.quantity,
Sales_Price__c=ql.UnitPrice, discount__c=ql.discount,
Line_Item_Description__c=ql.Description);

insert dli;

}

pageReference q = new pageReference('/' + dlv.id );
q.setRedirect(true);
return q;


}
return null;
}



public pagereference docancel(){
pageReference q = new pageReference('/' + qt.id );
q.setRedirect(true);
return q;

}

}

Hi All,

 

I setup Email-to-Case in my org, 

 

How to achieve this? 

 

Customer responses regarding a case are automatically associated with the original case, including any attachments the customer sends.

 

 

Please help me

Hi all'

 

Can anyone solve this????

 

I have 2 Objects 'Account' and 'Contact',these are having lookup relationship(Account is Parent object and Contact is Child object) and i have a field called 'Previous_Account__c' on Contact object..  so if Account record changed in contact record i want to update Previous_Account__c field with the Previous Account name.  

Need to build a 360 view of a customer Using multilevel pie charts:
Each block here indicates Assets of the particular customer

Assets may vary by each customer:

Say A customer has only 5 Assets that need to be displayed with The Inner Most Circle with Four blocks and the Middle circle with full round without having blocks
And each Asset has been placed based on the Product Priority.

Asset object  has a lookup with product Object and in the product object we have a priority field mentioned.Based on the priority these assets need to be placed in the circle(Ascending order).
Inner most Circle right top is priority1 like wise:

Each Product have a icon that need to be placed on each block.Based on the Product Priority

 

 

you can see the piechart by clicking the below link

Piechart ex

public class pageref{
    Account account;
    public Account getAccount(){
        if(account==null){
            account =new Account();}
        return account;
        
    }
    public pageReference save(){
        insert account;
       PageReference acctPage = new ApexPages.StandardController(account).view();
        acctPage.setRedirect(true);
        return acctPage;
    }

}

 

 

 

 

Error: Illigal assignment from system.pagereference to pagreference

 

 

can any body plz help me?

 

public class google_redir {
public PageReference hello1() {
PageReference reference=new PageReference('http://www.google.com');
reference.setRedirect(true);
return reference;
}

 

 

 

error message:

Error: Compile Error: Constructor not defined: [PageReference].<Constructor>(String) at line 3 column 33

I clicked on "disable development mode" button (on visulaforce page) . How can i get back to development mode when i open any visualforce page give me suggestions please

Hi all,

 

I am not able to pull the values .
I have 10 location
20 companies 
8 skills
 
 
<apex:page standardController="general__c" sidebar="false" showHeader="false" recordSetVar="general__c">
<apex:form >
<apex:pageBlock >
<apex:pageblockSection >
 
<apex:pageblockTable value="{!general__c}" var="ge"  columnsWidth="150px, 150px,150px , 150px" >
     <apex:column headerValue=" "/>
     <apex:column headerValue="Locations">value="{!ge.location__c}" </apex:column>
     <apex:column headerValue="companies" value="{!ge.company__c}"/>
     <apex:column headerValue="skills" value="{!ge.skills__c}"/> 
</apex:pageblockTable> 
 
</apex:pageblockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
 
 
 
Thanks,
Sneha 

public class pageref{
    Account account;
    public Account getAccount(){
        if(account==null){
            account =new Account();}
        return account;
        
    }
    public pageReference save(){
        insert account;
       PageReference acctPage = new ApexPages.StandardController(account).view();
        acctPage.setRedirect(true);
        return acctPage;
    }

}

 

 

 

 

Error: Illigal assignment from system.pagereference to pagreference

 

 

can any body plz help me?

 

public class google_redir {
public PageReference hello1() {
PageReference reference=new PageReference('http://www.google.com');
reference.setRedirect(true);
return reference;
}

 

 

 

error message:

Error: Compile Error: Constructor not defined: [PageReference].<Constructor>(String) at line 3 column 33

Hi,

 

I am trying to display the one of the document from documents object in to visual force page. But, I did not get the original format of document and it will be displayed in encoding format on visual force page.

 

Any one please help me how to display the document in visual force page as original format.

 

Iam create the transaction custom object.

 

I wrote the controller as:

 

 

public class transactionclass
{
public string str{set;get;}
public blob body{set;get;}
public string name{set;get;}
    public transactionclass(ApexPages.StandardController controller)
    {
document d=[select body,name from document where name='policyfreestyle' ];
blob b=d.body;
str=b.tostring();
    }

 

}

 

And i wrote the visual force page as:

 

<apex:page renderAs="pdf" standardController="Transaction__c" extensions="transactionclass">

<apex:form>

<apex:outputText value="{!str}"></apex:outputText>

</apex:form>

</apex:page>

 

 

Thank you,

Lakshmi