-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
0Replies
how to add new row to view last search/submit dae and time.
public class AccountExtension1
{
private final Account acct;
public Account acco{get; set;}
public List<Account> objacc{get; set;}
public string query1{get; set;}
public string conditionprefix = ' WHERE';
public AccountExtension1(ApexPages.StandardController stdController)
{
this.acct = (Account)stdController.getRecord();
}
public void check1()
{
query1= 'SELECT NAME , BillingCity,BillingState,BillingCountry,OwnerId,Industry,Hobbies__c,NRI__c,SLAExpirationDate__c from Account';
if(acct.BillingState!=null)
{
query1 = query1 + conditionprefix + ' BillingState = \'' +acct.BillingState + '\' ';
conditionprefix = ' AND ';
}
if(acct.OwnerId!=null)
{
query1 = query1 + conditionprefix + ' OwnerId = \'' +acct.OwnerId + '\' ';
conditionprefix = ' AND ';
}
if(acct.Industry!=null)
{
query1 = query1 + conditionprefix +' Industry = \'' +acct.Industry + '\' ';
conditionprefix = ' AND ';
}
if(acct.Hobbies__c!=null)
{
query1 = query1 + conditionprefix +' Hobbies__c includes (\'' +acct.Hobbies__c + '\') ';
conditionprefix = ' AND ';
}
if(acct.NRI__c!=false)
{
query1 = query1 + conditionprefix +' NRI__c =' + acct.NRI__c ;
conditionprefix = ' AND ';
}
if(acct.SLAExpirationDate__c!=null)
{
query1 = query1 + conditionprefix +' NRI__c = \'' +acct.NRI__c + '\' ';
conditionprefix = ' AND ';
}
objacc = database.query(query1);
}
}
//visual force page..............
<apex:page standardController="Account" extensions="AccountExtension1" showheader = "false" sidebar = "false">
<apex:form>
<apex:pageBlock title="My Content">
<apex:pageBlockSection>
<apex:inputField id="theTextInput3" value="{!Account.BillingState}" />
<apex:inputField id="theTextInput5" value="{!Account.OwnerId}" />
<apex:inputField id="theTextInput7" value="{!Account.Industry}" />
<apex:inputField id="theTextInput8" value="{!Account.Hobbies__c}" />
<apex:inputField id="theTextInput9" value="{!Account.NRI__c}" />
<apex:inputField id="theTextInput10" value="{!Account.SLAExpirationDate__c}" />
</apex:pageBlockSection>
<apex:pageBlockButtons>
<apex:commandButton value="Submit" action="{!check1}" >
</apex:commandButton>
</apex:pageBlockButtons>
<apex:pageBlockSection>
<apex:outputtext style="border:1px; background-color:#F3F3EC;" value="{!query1}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockTable value="{!objacc}" var="data" >
<apex:column headerValue="Name" value="{!data.Name}"/>
<apex:column headerValue="BillingCountry" value="{!data.BillingCountry}"/>
<apex:column headerValue="BillingState" value="{!data.BillingState}"/>
<apex:column headerValue="Owner Name" value="{!data.OwnerId}"/>
<apex:column headerValue="Industry" value="{!data.Industry}"/>
<apex:column headerValue="Hobbies" value="{!data.Hobbies__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<!-- End Default Content REMOVE THIS -->
</apex:page>
-
- Romil Gupta
- September 05, 2016
- Like
- 0
- Continue reading or reply
problem Facing in module -report that shows high-value opportunities.
Hi all,
i m facing some problem while i m trying to complte my modules . i have checked all my language setting regarding currency problem.but the problem still persist. can any one help me to solve this problem.
thank you.

i m facing some problem while i m trying to complte my modules . i have checked all my language setting regarding currency problem.but the problem still persist. can any one help me to solve this problem.
thank you.
-
- Romil Gupta
- August 13, 2016
- Like
- 0
- Continue reading or reply
-
- Romil Gupta
- August 01, 2016
- Like
- 0
- Continue reading or reply