• Venky5599
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi Mohan,

This is Venkat. HAve total 8 yrs of experience in IT and 5 yrs in Salesforce. I have individual team in saelasforce morethan 3+ yrs of experience.

Kindly let me know still you are looking for support.

Thanks,
Venkat
Email : avula.venkateswar@gmail.com

 

HI All

 

 

i have a page block table in that table i have all the Account and Check box for each Account .

i need to controlle the user when he is selecting the Check boxes.

means user should not select more the one check box at a time can you please help me for this?

 

Thanks 

Pradeep.G

Hi all 

 

I want to Edit the Account by using the Check Box .

 

 

here is my visual force page 

 

<apex:page controller="CustomAccountLookupController2"
title="Search"
showHeader="false"
sideBar="false"
tabStyle="Account"
id="pg">

<script>
function validateandclose(name,RecId){

if(document.getElementById("RecordContent")){
var errorString = document.getElementById("RecordContent").innerHTML;
if(errorString.indexOf('Error:')==-1){//alert("in Validate");
fillIn(name,RecId);
}
}

}
function fillIn(name,id)
{
var winMain=window.opener;
if (null==winMain)
{
winMain=window.parent.opener;
}

var ele=winMain.document.getElementById('{!$CurrentPage.parameters.txt}');
//alert(id + '####' + ele);
ele.value=name;
var idval = '{!$CurrentPage.parameters.txt}' + '_lkid';

ele=winMain.document.getElementById(idval);
//alert(ele)
ele.value=id;

CloseWindow();
}
function CloseWindow()
{
var winMain=window.opener;
if (winMain != null) {
window.close();
if (null==winMain)
{
winMain=window.parent.opener;
}
//winMain.closeLookupPopup();
}

}
</script>


<apex:form id="f">
<apex:outputPanel id="page" layout="block" style="margin:5px;padding:10px;padding-top:2px;">
<apex:tabPanel switchType="client" selectedTab="name1" id="tabbedPanel">

<!-- SEARCH TAB -->
<apex:tab label="Search" name="tab1" id="tabOne">

<apex:actionRegion >
<apex:outputPanel id="top" layout="block" style="margin:5px;padding:10px;padding-top:2px;">
<apex:outputLabel value="Search" style="font-weight:Bold;padding-right:10px;" for="txtSearch"/>
<apex:inputText id="txtSearch" value="{!searchString}" />
<span style="padding-left:5px"><apex:commandButton id="btnGo" value="Go" action="{!Search}" rerender="searchResults"></apex:commandButton></span>
</apex:outputPanel>

<apex:outputPanel id="pnlSearchResults" style="margin:10px;height:350px;overflow-Y:auto;" layout="block">
<apex:pageBlock id="searchResults">
<apex:pageBlockButtons>
<apex:commandButton value="Edit"/>
<apex:commandButton value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!results}" var="a" id="tblResults">
<apex:column >

<apex:inputCheckbox/>


</apex:column>
<apex:column >
<apex:facet name="header">
<apex:outputPanel >Name</apex:outputPanel>
</apex:facet>
<apex:outputLink value="javascript&colon;top.window.opener.lookupPick2('{!FormTag}','{!TextBox}_lkid','{!TextBox}','{!a.Id}','{!a.Name}', false)" rendered="{!NOT(ISNULL(a.Id))}">{!a.Name}</apex:outputLink>
</apex:column>
<apex:column >
<apex:facet name="header">
<apex:outputPanel >Business AddressLine1</apex:outputPanel>
</apex:facet> {!a.Main_Address_Line1__c}
</apex:column>
<apex:column>
<apex:facet name="header">
<apex:outputPanel>Business AddressLine2</apex:outputPanel>
</apex:facet>{!a.Main_Address_Line2__c}
</apex:column>
<apex:column>
<apex:facet name="header">
<apex:outputPanel>Business AddressLine3</apex:outputPanel>
</apex:facet> {!a.Main_Address_Line3__c}
</apex:column>
<apex:column>
<apex:facet name="header">
<apex:outputPanel>City</apex:outputPanel>
</apex:facet> {!a.Main_City__c}
</apex:column>
<apex:column>
<apex:facet name="header">
<apex:outputPanel>State</apex:outputPanel>
</apex:facet>{!a.Main_State__c}
</apex:column>
<apex:column>
<apex:facet name="header">
<apex:outputPanel>Country</apex:outputPanel>
</apex:facet>{!a.Main_Country__c}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:outputPanel>
</apex:actionRegion>

</apex:tab>

<!-- NEW ACCOUNT TAB -->
<apex:tab label="New Account" name="tab2" id="tabTwo">

<apex:pageBlock id="newAccount" title="New Account" >
<div id="RecordContent">
<apex:pageBlockButtons >
<!--<apex:commandButton action="{!saveAccount}" value="Save" />-->
<apex:commandButton action="{!saveAccount}" value="Save" oncomplete="validateandclose('{!insertedRecName}','{!insertedRecId}')" reRender="newAccount"/>

</apex:pageBlockButtons>
<apex:pageMessages />

<apex:pageBlockSection columns="2" id="pbs">
<apex:inputField value="{!Account.Name}" required="true" id="aname" taborderhint="1"/>
<apex:inputField value="{!Account.Type}" id="type" taborderhint="6"/>
<apex:inputField value="{!Account.Main_Address_Line1__c}" id="line1" taborderhint="2"/>
<apex:inputField value="{!Account.Main_City__c}" id="city" taborderhint="7"/>
<apex:inputField value="{!Account.Main_Address_Line2__c}" id="line2" taborderhint="3"/>
<apex:inputField value="{!Account.Main_State__c}" id="state" taborderhint="8"/>

<apex:inputField value="{!Account.Main_Address_Line3__c}" id="line3" taborderhint="4"/>
<apex:inputField value="{!Account.Main_Country__c}" id="cntry" taborderhint="9"/>
<apex:inputField value="{!Account.Business_Zip_Code__c}" id="code" taborderhint="5"/>
<apex:inputField value="{!Account.Region__c}" id="reg" taborderhint="10"/>


<!-- <apex:repeat value="{!$ObjectType.Account.FieldSets.CustomAccountLookup}" var="f">

<apex:inputField value="{!Account[f]}"/>
</apex:repeat>-->
</apex:pageBlockSection>
</div>
</apex:pageBlock>

</apex:tab>
</apex:tabPanel>
</apex:outputPanel>
</apex:form>
</apex:page>

 

Controller 

 

public with sharing class CustomAccountLookupController2 {

public Account account {get;set;} // new account to create
public List<Account> results{get;set;} // search results
public string searchString{get;set;} // search keyword
public String insertedRecId{get;set;}//inserted Record Id
public String insertedRecName{get;set;}//inserted Record Name

public CustomAccountLookupController2() {
account = new Account();
// get the current search string
searchString = System.currentPageReference().getParameters().get('lksrch');
runSearch();
}

// performs the keyword search
public PageReference search() {
runSearch();
return null;
}

// prepare the query and issue the search command
private void runSearch() {
// TODO prepare query string for complex serarches & prevent injections
results = performSearch(searchString);
}

// run the search and return the records found.
private List<Account> performSearch(string searchString) {

String soql = 'select id, name , type ,Main_Address_Line1__c,Main_Address_Line2__c,Main_Address_Line3__c,Main_City__c,Main_Country__c,Main_State__c,Business_Zip_Code__c from account';
if(searchString != '' && searchString != null)
soql = soql + ' where name LIKE \'%' + searchString +'%\'' ;
soql = soql + ' limit 25';
System.debug(soql);
return database.query(soql);

}

// save the new account record
public PageReference saveAccount() {

// save the new contactrecord
if(account.name<>''){
insert account;
List<sObject> Resultlist = new List<sObject>();
if(account.Id!=null){
string soql = 'select Name from Account where Id = \'' + account.Id + '\'';
Resultlist = database.query(soql); // Required ResultList.
for(sObject sObj : Resultlist){
insertedRecName= (String) sObj.get('name');
insertedRecId = (String) sObj.get('id');

}
}
// reset the contact
account= new Account ();
return null;} else{return null;}
}


// used by the visualforce page to send the link to the right dom element
public string getFormTag() {
return System.currentPageReference().getParameters().get('frm');
}

// used by the visualforce page to send the link to the right dom element for the text box
public string getTextBox() {
return System.currentPageReference().getParameters().get('txt');
}

}my require ment is when i click on the check box and click on the Edit Button i has to check how many Conatct are there under this Account if Contacts are more than one i has to thrown Error like 'Do not edit this Account'. if it is having only one Accoutn then user can Edit the Account.

Bridge (www.bridge.edu) is a Denver-based international language and education company.  We are seeking an experienced SF developer to assist in adding new customized features.

Summary of Projects:
Scheduling: We have built the bones and structure of a new scheduling program that works with standard and custom objects to schedule classes, charge student Accounts, pay instructors and show balances of classes taught, used and remaining for financial reporting.  There is still a fair amount of design that needs to be done to make the program user-friendly as well as more functionality that needs to be built.  However, all the tasks that are still unfinished require programming in order to finish.
Book Inventory: We have built the majority of this program but need a little more Apex code in order for it to function to its full capacity.
Teacher Portal: We need to build a teacher portal from our website to SalesForce so that the teachers can update information related to their students and classes.  We have existing customer portals to use as a design base, however the teacher portal will be much more in-depth as they will be editing more information and creating new information from the portal to be entered directly into SalesForce.
Testing: We have the objects and functionality built but need assistance getting customized, PDF reporting options to work.
Future projects: There will be many future projects for us as this is our main operating system and we want ALL functions of the company to be run via SalesForce.

Desired Experience and Skills:
• Experience working with SalesForce
• Knowledgeable in multiple programming languages, including Apex and VisualForce
• Excellent written and oral communication skills
• Able to think “outside the box”
• Have a keen eye for design/aesthetics as well as programming details
• Experience creating an app for the AppExchange

To Apply:
Please email the SalesForce Administrator, Emily Craig, at ecraig@bridge.edu.  Include hourly rate and available start date. The company is looking to start working with a developer immediately.

 

HI All

 

 

i have a page block table in that table i have all the Account and Check box for each Account .

i need to controlle the user when he is selecting the Check boxes.

means user should not select more the one check box at a time can you please help me for this?

 

Thanks 

Pradeep.G

HI all.,

I am using check box field in my visual force page.

In my page  header check box controlling the column checkbox field.

when i  check the header column are checked wise versa and any one of the column is unchecked the header is unchecked and all the column  check box is checkd manually than the header is automatically checked like standard page.

 

suggest me any validation ..

 

Thanks & Regards

satz 

  • April 25, 2012
  • Like
  • 0
Bridge (www.bridge.edu) is a Denver-based international language and education company.  We are seeking an experienced SF developer to assist in adding new customized features.

Summary of Projects:
Scheduling: We have built the bones and structure of a new scheduling program that works with standard and custom objects to schedule classes, charge student Accounts, pay instructors and show balances of classes taught, used and remaining for financial reporting.  There is still a fair amount of design that needs to be done to make the program user-friendly as well as more functionality that needs to be built.  However, all the tasks that are still unfinished require programming in order to finish.
Book Inventory: We have built the majority of this program but need a little more Apex code in order for it to function to its full capacity.
Teacher Portal: We need to build a teacher portal from our website to SalesForce so that the teachers can update information related to their students and classes.  We have existing customer portals to use as a design base, however the teacher portal will be much more in-depth as they will be editing more information and creating new information from the portal to be entered directly into SalesForce.
Testing: We have the objects and functionality built but need assistance getting customized, PDF reporting options to work.
Future projects: There will be many future projects for us as this is our main operating system and we want ALL functions of the company to be run via SalesForce.

Desired Experience and Skills:
• Experience working with SalesForce
• Knowledgeable in multiple programming languages, including Apex and VisualForce
• Excellent written and oral communication skills
• Able to think “outside the box”
• Have a keen eye for design/aesthetics as well as programming details
• Experience creating an app for the AppExchange

To Apply:
Please email the SalesForce Administrator, Emily Craig, at ecraig@bridge.edu.  Include hourly rate and available start date. The company is looking to start working with a developer immediately.