You need to sign in to do that
Don't have an account?
Sudhir_Meru
Page Redirect to Opportunity
Hi,
I created a visual force page which has two option user can eithere select existing opportunity from pick list or He can create a new opportunity.
After saving the data page must redirect to selected or created opportunity. Please suggest me how to implement
Below is the visualforce page.
<apex:page controller="CCW_ContactPaginationController" showHeader="true" sidebar="true" >
<script type="text/javascript">
/*
* function to handle checkbox selection
*/
function doCheckboxChange(cb,itemId){
if(cb.checked==true){
aSelectItem(itemId);
}
else{
aDeselectItem(itemId);
}
}
function doCheckboxChange2(cb,itemId){
if(cb.checked==true){
aSelectItem2(itemId);
}
else{
aDeselectItem2(itemId);
}
}
</script>
<!-- Using apex:pageMessages instead
<script type="text/javascript">
function Validation()
{
var val = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.confignewopp.newopp}').value;
var oval = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configopport.existopp}').value;
var edate = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configexpiredate.expredate}').value;
var eterm = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configexpire.expterms}').value;
var eresr = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configreseller.resler}').value;
var edstb = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configdistrbutor.distbtr}').value;
if ( edate == '' && eterm == '0' ) {
alert('Enter either expire date or select expite term');
return false;
}
else if ( edate != '' && eterm != '0' )
{
alert('Enter either expire date or select expite term');
return false;
}
else if ( eresr == '' && edstb == '' )
{
alert('Enter reseller and distributor details');
return false;
}
else if ( eresr == '' && edstb != '' )
{
alert('Enter reseller details');
return false;
}
else if ( eresr != '' && edstb == '' )
{
alert('Enter distributor details');
return false;
}
else if ( val == '' && oval == '')
{
alert('Enter either existing opportunity or new opporutnity');
return false;
}
else if ( val != '' && oval != '')
{
alert('Enter either existing opportunity or new opporutnity');
return false;
}
else
alert('Please check row in Install Based Report to saved records');
return true;
}
</script>
Done commenting the javaScript code -->
<apex:sectionHeader subtitle="Create Renewal Quote" title="Meru Networks"/>
<apex:form id="RenewalForm">
<apex:pageBlock id="filterblock">
<apex:pageBlockSection title="Filters" columns="3" id="filterblocksection">
<apex:inputField value="{!GetAccount.AccountId}" label="Account"/>
<apex:inputField value="{!GetContract.Name}" label="Contract" required="false"/>
<apex:commandButton action="{!fetch_data}" value="Fetch Data"></apex:commandbutton>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock id="reportblock">
<apex:pageMessages />
<apex:pageBlockButtons id="reportbutton">
<apex:commandButton value="Save Records" action="{!processSelected}" />
<apex:commandButton value="Cancel" onclick="window.top.close()"/>
</apex:pageBlockButtons>
<!-- handle selected item -->
<apex:actionFunction name="aSelectItem" action="{!doSelectItem}" rerender="mpb">
<apex:param name="contextItem" value="" assignTo="{!contextItem}"/>
</apex:actionFunction>
<apex:actionFunction name="aSelectItem2" action="{!doSelectItem2}" rerender="mpb">
<apex:param name="contextItem2" value="" assignTo="{!contextItem2}" />
</apex:actionFunction>
<!-- handle deselected item -->
<apex:actionFunction name="aDeselectItem" action="{!doDeselectItem}" rerender="mpb">
<apex:param name="contextItem" value="" assignTo="{!contextItem}"/>
</apex:actionFunction>
<apex:actionFunction name="aDeselectItem2" action="{!doDeselectItem2}" rerender="mpb">
<apex:param name="contextItem2" value="" assignTo="{!contextItem2}"/>
</apex:actionFunction>
<apex:pageBlockSection title="Install Base" id="mpb" collapsible="true" columns="1" >
<!-- table of data -->
<apex:pageBlockTable title="Assets" value="{!Contacts}" var="c" id="reportblocktable" >
<apex:column >
<apex:facet name="header">Action</apex:facet>
<apex:inputCheckbox value="{!c.IsSelected}" onclick="doCheckboxChange(this,'{!c.tContact.Id}')"/>
</apex:column>
<apex:column >
<apex:facet name="header">Bundle Support</apex:facet>
<apex:inputCheckbox value="{!c.BundelSelected}" onclick="doCheckboxChange2(this,'{!c.tContact.Id}')"/>
</apex:column>
<apex:column value="{!c.tContact.AccountId}"/>
<apex:column value="{!c.tContact.Product2Id}"/>
<apex:column value="{!c.tContact.SerialNumber}"/>
<apex:column value="{!c.tContact.last_contract_number__c}"/>
<apex:column value="{!c.tContact.Service_Start_Date_Min__c}"/>
<apex:column value="{!c.tContact.Service_End_Date_Max__c}"/>
<apex:column value="{!c.tContact.InstallDate}"/>
<apex:inlineEditSupport event="ondblClick"
showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
</apex:pageBlockTable>
<apex:pageBlockSection collapsible="false" columns="2" id="paginsecblock">
<!-- count of selected items -->
<apex:outputLabel value="[{!selectedCount} records selected]" />
<!-- next, previous and page info -->
<apex:outputPanel style="float:right">
<apex:commandLink action="{!doPrevious}" rendered="{!hasPrevious}" value="Previous" />
<apex:outputLabel rendered="{!NOT(hasPrevious)}" value="Previous"/>
<apex:outputLabel value=" (page {!pageNumber} of {!totalPages}) "/>
<apex:commandLink action="{!doNext}" rendered="{!hasNext}" value="Next" />
<apex:outputLabel rendered="{!NOT(hasNext)}" value="Next"/>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock id="configblock">
<apex:pageBlockSection title="Configuration Option" columns="2" id="configsecblock">
<apex:pageBlockSectionItem id="configexpire">
<apex:outputLabel value="Expiry Term:" for="expireterm"/>
<apex:selectList value="{!ExpireTerms}" multiselect="false" size="1" id="expterms">
<apex:selectOption itemValue="0" itemLabel="--none--" id="exptermsnon"/>
<apex:selectOption itemValue="1" itemLabel="1 Year"/>
<apex:selectOption itemValue="3" itemLabel="3 Year"/>
<apex:selectOption itemValue="5" itemLabel="5 Year"/>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configexpiredate">
<apex:outputLabel value="Expiry Date:"/>
<apex:inputField value="{!GetExpireDate.Expire_Date__c}" id="expredate"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configincumbent">
<apex:outputLabel value="Incumbent Reseller"></apex:outputLabel>
<!--apex:inputCheckbox value="{!IncumbentReseller}"/-->
<apex:selectList value="{!IncumbentReseller}" multiselect="false" size="1" id="incumbentReseller">
<apex:selectOption itemValue="No" itemLabel="No" />
<apex:selectOption itemValue="Yes" itemLabel="Yes" />
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configeducation">
<apex:outputLabel value="Education"></apex:outputLabel>
<!--apex:inputCheckbox value="{!Education}"/-->
<apex:selectList value="{!Education}" multiselect="false" size="1" id="Education">
<apex:selectOption itemValue="None" itemLabel="None" />
<apex:selectOption itemValue="K-12" itemLabel="K-12" />
<apex:selectOption itemValue="Higher-Ed" itemLabel="Higher-Ed" />
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configreseller">
<apex:outputLabel value="Reseller"></apex:outputLabel>
<apex:inputField value="{!GetReseller.Primary_Reseller__c}" id="resler" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configdistrbutor">
<apex:outputLabel value="Distributor"></apex:outputLabel>
<apex:inputField value="{!GetDistributor.Primary_Distributor__c}" id="distbtr"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configopport">
<apex:outputLabel value="Opportunity"></apex:outputLabel>
<apex:inputField value="{!GetOpportunity.Opportunity__c}" id="existopp"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="confignewopp">
<apex:outputLabel value="New Opportunity"></apex:outputLabel>
<apex:inputField value="{!GetNewOpportunity.New_Opportunity__c}" id="newopp"/>
</apex:pageBlockSectionItem>
<apex:pageblockSectionItem id="configMonthlyQuote">
<apex:outputLabel value="Monthly Quote"></apex:outputLabel>
<apex:inputCheckbox value="{!monthly_quote}" id="monthlyQuote"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Let me know if you need controller will past the code.
Thanks
Sudhir
I created a visual force page which has two option user can eithere select existing opportunity from pick list or He can create a new opportunity.
After saving the data page must redirect to selected or created opportunity. Please suggest me how to implement
Below is the visualforce page.
<apex:page controller="CCW_ContactPaginationController" showHeader="true" sidebar="true" >
<script type="text/javascript">
/*
* function to handle checkbox selection
*/
function doCheckboxChange(cb,itemId){
if(cb.checked==true){
aSelectItem(itemId);
}
else{
aDeselectItem(itemId);
}
}
function doCheckboxChange2(cb,itemId){
if(cb.checked==true){
aSelectItem2(itemId);
}
else{
aDeselectItem2(itemId);
}
}
</script>
<!-- Using apex:pageMessages instead
<script type="text/javascript">
function Validation()
{
var val = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.confignewopp.newopp}').value;
var oval = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configopport.existopp}').value;
var edate = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configexpiredate.expredate}').value;
var eterm = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configexpire.expterms}').value;
var eresr = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configreseller.resler}').value;
var edstb = document.getElementById('{!$Component.RenewalForm.configblock.configsecblock.configdistrbutor.distbtr}').value;
if ( edate == '' && eterm == '0' ) {
alert('Enter either expire date or select expite term');
return false;
}
else if ( edate != '' && eterm != '0' )
{
alert('Enter either expire date or select expite term');
return false;
}
else if ( eresr == '' && edstb == '' )
{
alert('Enter reseller and distributor details');
return false;
}
else if ( eresr == '' && edstb != '' )
{
alert('Enter reseller details');
return false;
}
else if ( eresr != '' && edstb == '' )
{
alert('Enter distributor details');
return false;
}
else if ( val == '' && oval == '')
{
alert('Enter either existing opportunity or new opporutnity');
return false;
}
else if ( val != '' && oval != '')
{
alert('Enter either existing opportunity or new opporutnity');
return false;
}
else
alert('Please check row in Install Based Report to saved records');
return true;
}
</script>
Done commenting the javaScript code -->
<apex:sectionHeader subtitle="Create Renewal Quote" title="Meru Networks"/>
<apex:form id="RenewalForm">
<apex:pageBlock id="filterblock">
<apex:pageBlockSection title="Filters" columns="3" id="filterblocksection">
<apex:inputField value="{!GetAccount.AccountId}" label="Account"/>
<apex:inputField value="{!GetContract.Name}" label="Contract" required="false"/>
<apex:commandButton action="{!fetch_data}" value="Fetch Data"></apex:commandbutton>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock id="reportblock">
<apex:pageMessages />
<apex:pageBlockButtons id="reportbutton">
<apex:commandButton value="Save Records" action="{!processSelected}" />
<apex:commandButton value="Cancel" onclick="window.top.close()"/>
</apex:pageBlockButtons>
<!-- handle selected item -->
<apex:actionFunction name="aSelectItem" action="{!doSelectItem}" rerender="mpb">
<apex:param name="contextItem" value="" assignTo="{!contextItem}"/>
</apex:actionFunction>
<apex:actionFunction name="aSelectItem2" action="{!doSelectItem2}" rerender="mpb">
<apex:param name="contextItem2" value="" assignTo="{!contextItem2}" />
</apex:actionFunction>
<!-- handle deselected item -->
<apex:actionFunction name="aDeselectItem" action="{!doDeselectItem}" rerender="mpb">
<apex:param name="contextItem" value="" assignTo="{!contextItem}"/>
</apex:actionFunction>
<apex:actionFunction name="aDeselectItem2" action="{!doDeselectItem2}" rerender="mpb">
<apex:param name="contextItem2" value="" assignTo="{!contextItem2}"/>
</apex:actionFunction>
<apex:pageBlockSection title="Install Base" id="mpb" collapsible="true" columns="1" >
<!-- table of data -->
<apex:pageBlockTable title="Assets" value="{!Contacts}" var="c" id="reportblocktable" >
<apex:column >
<apex:facet name="header">Action</apex:facet>
<apex:inputCheckbox value="{!c.IsSelected}" onclick="doCheckboxChange(this,'{!c.tContact.Id}')"/>
</apex:column>
<apex:column >
<apex:facet name="header">Bundle Support</apex:facet>
<apex:inputCheckbox value="{!c.BundelSelected}" onclick="doCheckboxChange2(this,'{!c.tContact.Id}')"/>
</apex:column>
<apex:column value="{!c.tContact.AccountId}"/>
<apex:column value="{!c.tContact.Product2Id}"/>
<apex:column value="{!c.tContact.SerialNumber}"/>
<apex:column value="{!c.tContact.last_contract_number__c}"/>
<apex:column value="{!c.tContact.Service_Start_Date_Min__c}"/>
<apex:column value="{!c.tContact.Service_End_Date_Max__c}"/>
<apex:column value="{!c.tContact.InstallDate}"/>
<apex:inlineEditSupport event="ondblClick"
showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
</apex:pageBlockTable>
<apex:pageBlockSection collapsible="false" columns="2" id="paginsecblock">
<!-- count of selected items -->
<apex:outputLabel value="[{!selectedCount} records selected]" />
<!-- next, previous and page info -->
<apex:outputPanel style="float:right">
<apex:commandLink action="{!doPrevious}" rendered="{!hasPrevious}" value="Previous" />
<apex:outputLabel rendered="{!NOT(hasPrevious)}" value="Previous"/>
<apex:outputLabel value=" (page {!pageNumber} of {!totalPages}) "/>
<apex:commandLink action="{!doNext}" rendered="{!hasNext}" value="Next" />
<apex:outputLabel rendered="{!NOT(hasNext)}" value="Next"/>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock id="configblock">
<apex:pageBlockSection title="Configuration Option" columns="2" id="configsecblock">
<apex:pageBlockSectionItem id="configexpire">
<apex:outputLabel value="Expiry Term:" for="expireterm"/>
<apex:selectList value="{!ExpireTerms}" multiselect="false" size="1" id="expterms">
<apex:selectOption itemValue="0" itemLabel="--none--" id="exptermsnon"/>
<apex:selectOption itemValue="1" itemLabel="1 Year"/>
<apex:selectOption itemValue="3" itemLabel="3 Year"/>
<apex:selectOption itemValue="5" itemLabel="5 Year"/>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configexpiredate">
<apex:outputLabel value="Expiry Date:"/>
<apex:inputField value="{!GetExpireDate.Expire_Date__c}" id="expredate"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configincumbent">
<apex:outputLabel value="Incumbent Reseller"></apex:outputLabel>
<!--apex:inputCheckbox value="{!IncumbentReseller}"/-->
<apex:selectList value="{!IncumbentReseller}" multiselect="false" size="1" id="incumbentReseller">
<apex:selectOption itemValue="No" itemLabel="No" />
<apex:selectOption itemValue="Yes" itemLabel="Yes" />
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configeducation">
<apex:outputLabel value="Education"></apex:outputLabel>
<!--apex:inputCheckbox value="{!Education}"/-->
<apex:selectList value="{!Education}" multiselect="false" size="1" id="Education">
<apex:selectOption itemValue="None" itemLabel="None" />
<apex:selectOption itemValue="K-12" itemLabel="K-12" />
<apex:selectOption itemValue="Higher-Ed" itemLabel="Higher-Ed" />
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configreseller">
<apex:outputLabel value="Reseller"></apex:outputLabel>
<apex:inputField value="{!GetReseller.Primary_Reseller__c}" id="resler" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configdistrbutor">
<apex:outputLabel value="Distributor"></apex:outputLabel>
<apex:inputField value="{!GetDistributor.Primary_Distributor__c}" id="distbtr"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="configopport">
<apex:outputLabel value="Opportunity"></apex:outputLabel>
<apex:inputField value="{!GetOpportunity.Opportunity__c}" id="existopp"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="confignewopp">
<apex:outputLabel value="New Opportunity"></apex:outputLabel>
<apex:inputField value="{!GetNewOpportunity.New_Opportunity__c}" id="newopp"/>
</apex:pageBlockSectionItem>
<apex:pageblockSectionItem id="configMonthlyQuote">
<apex:outputLabel value="Monthly Quote"></apex:outputLabel>
<apex:inputCheckbox value="{!monthly_quote}" id="monthlyQuote"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Let me know if you need controller will past the code.
Thanks
Sudhir
If you are not understand put your code, i will help you..!
All Answers
If you are not understand put your code, i will help you..!
Hi Arun,
Please see below controller function code. I have highlighted the function i am calling in visual force page !processselected page redirect must be called inside this function after saving the data it must redirect to opportunity
Please help me how to add
public void processSelected() {
Integer currentPageNumber = setCon.getPageNumber();
selectedAssets = new List<Asset>();
list<Temp_Assets__c> TempAssetList = new list<Temp_Assets__c>();
setCon.setpageNumber(1);
while(true){
List<Asset> TempAssetLists = (List<Asset>)setCon.getRecords();
for(Asset assetIns : TempAssetLists ) {
if(this.selectedContactIds.contains(assetIns.Id)){
selectedAssets.add(assetIns);
}
}
if(setCon.getHasNext()){
setCon.next();
}
else{
break;
}
}
/**********Added by Unnat*********************************/
//below code should only execute if Expiry term has a value
Date maxDate=Date.valueOf('2000-1-1');
Date minDate;
//Calculate the maximum Date off of the selected dates
//finds the latest expiry date out of the selected assets
for (Asset assets: selectedAssets) {
if(assets.Service_End_Date_Max__c > maxDate) {
maxDate=assets.Service_End_Date_Max__c;
}
}
System.debug('== Latest Service end Date is:'+ maxDate);
minDate = maxDate;
for (Asset assets: selectedAssets) {
if(minDate > assets.Service_End_Date_Max__c) {
minDate=assets.Service_End_Date_Max__c;
}
}
System.debug('== Least Service end Date is:'+ minDate);
if (ExpireTerms !=null) {
System.debug('== Expire Terms has a value');
//There will be another condition to add the expiry term to the latest expiry date
//String a='1 Year';
System.debug('== ExpireTerms is: '+ ExpireTerms);
if (ExpireTerms=='1') {
System.debug('== First if condition');
maxDate=maxDate.addYears(1);
}
else if (ExpireTerms == '3') {
System.debug('== Second if condition');
maxDate=maxDate.addYears(3);
}
else if (ExpireTerms == '5') {
System.debug('== third if condition');
maxDate=maxDate.addYears(5);
}
else {
maxDate= GetExpireDate.Expire_Date__c;
}
}
else {
System.debug('== Else condition');
maxDate= GetExpireDate.Expire_Date__c;
}
System.debug('== Max Date is: ' + maxDate);
Integer totalDays = minDate.daysBetween(maxDate);
System.debug('== Total days difference is: '+ totalDays);
/****************Completed by Unnat*****************************/
System.debug('=- after the if condition');
Account ResellerAct;
Account DistributorAct;
Opportunity Oppt;
for(Asset Act : selectedAssets)
{
Temp_Assets__c TempAsset = new Temp_Assets__c();
TempAsset.Name = 'Sudhir';
TempAsset.AccountId__c = Act.AccountId;
TempAsset.Product__c = Act.Product2Id;
//Added by Unnat
TempAsset.Product_lookup__c= Act.Product2Id;
TempAsset.Asset_Id__c = Act.Id;
TempAsset.Serial_Number__c = Act.SerialNumber;
TempAsset.Last_Contract_Number__c = Act.last_contract_number__c;
TempAsset.Service_Start_Date__c = Act.Service_Start_Date_Min__c;
//TempAsset.Service_End_Date__c = Act.Service_End_Date_Max__c;
/***************Added by Unnat********************************************/
TempAsset.Opp_Close_Date__c = minDate;
TempAsset.Monthly_Quote__c = Monthly_Quote;
System.debug('=- Monthly Quote is: ' + monthly_Quote);
if (Act.Service_End_Date_Max__c != null) {
TempAsset.Service_End_Date__c = Act.Service_End_Date_Max__c;
}
else {
TempAsset.Service_End_Date__c = Act.InstallDate;
}
TempAsset.Install_Date__c = Act.InstallDate;
System.debug ('==== Reseller id is: '+ GetReseller.Primary_Reseller__c);
TempAsset.Reseller__c = GetReseller.Primary_Reseller__c;
TempAsset.Distributor__c = GetDistributor.Primary_Distributor__c;
/****************Commented by Unnat****************************************************************************
If (GetReseller.AccountId <> NULL)
{
ResellerAct = [ SELECT Id FROM Account WHERE ID = :GetReseller.Primary_Reseller__c Limit 1];
TempAsset.Reseller__c = ResellerAct.Id;
System.debug ('==== Reseller id 2 is: '+ ResellerAct.Id);
}
If (GetDistributor.AccountId <> NULL )
{
DistributorAct = [ SELECT Id FROM Account WHERE ID = :GetDistributor.Primary_Distributor__c Limit 1];
TempAsset.Distributor__c = DistributorAct.Id;
}
****************Completed by Unnat *****************************************************************************/
If ( GetOpportunity.Opportunity__c <> NULL )
{
Oppt = [SELECT Id FROM Opportunity WHERE ID = :GetOpportunity.Opportunity__c Limit 1];
TempAsset.Existing_Opportunity__c = Oppt.Id;
}
TempAsset.Incumbent_Reseller__c = IncumbentReseller;
TempAsset.Education__c = Education;
//TempAsset.Expiry_Date__c = GetExpireDate.Expire_Date__c;
TempAsset.Expiry_Date__c= maxDate;
TempAsset.New_Opportunity__c = GetNewOpportunity.New_Opportunity__c;
TempAsset.Expiry_Term__c = ExpireTerms;
/* Insert Bundel Checkbox Value */
if (this.selectedContactIds2.contains(Act.Id)){
bundsprt=true;
}
else {
bundsprt=false;
}
TempAsset.Bundle_Support__c = bundsprt;
System.debug('== Bundle Value is: ' + bundsprt);
//Add the selected Assets to the List
TempAssetList.add(TempAsset);
}
Insert TempAssetList;
// } //end of if Condition for check of days more than 3 years
}
setCon.setpageNumber(currentPageNumber);
}
Thanks
Sudhir
I am adding complete code Please check the controller below Please help me to modify let me know which you dont understand in the code.
From Visualforce page I am calling !ProcessSelected funcation inside the same funcation I need to call redirect once the data is inserted.
Thanks
Sudhir