-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
8Questions
-
1Replies
How to find the distance in miles between two US zip Codes
Hi All,
I need to find the distance in miles. If i provide to two zip codes of US, so it should calculate and give the distance in miles between the two. Can anyone help on this.
Thanks
Ruchie
- Ruchie
- July 23, 2009
- Like
- 0
- Continue reading or reply
can I automate the sharing of records through Salesforce to Salesforce?
Hi All,
We can auto accept the records from an org, this is a new feature in summer'09. What if i want to forward the newly created account records automatically. Is there a way out, through which we can access the External sharing object and forward the records automatically, as soon as it gets created.
Please help,
Thanks
- Ruchie
- July 23, 2009
- Like
- 0
- Continue reading or reply
How to read the contents of css/HTML file placed in documents or Static Resources.
Hi,
Can anyone please help, how to read the contents of the CSS file or any other file placed in the documents. I need this, so that i can read the contents of CSS and modify the code accordingly, instead modifying in the CSS. Also, this is required, if i place the HTML static code in documents and name the file as header, footer. SO, i need to read the HTML content fom that file, and create the static HTML on the VF Page. I want to use that file as template in the VF page. Please help.
Thanks
- Ruchie
- July 23, 2009
- Like
- 0
- Continue reading or reply
DescribeSObject in Visualforce controller
- Ruchie
- January 15, 2009
- Like
- 0
- Continue reading or reply
Help on the Test Method for VF Controller
public class Cnrl_Con_Inv { List<List<Contact>> listAccount = new List<List<Contact>>(); List<Contact> accTemp; String txtSearch=System.currentPageReference().getParameters().get('txt'); Integer intPageSize = 20; Integer intCount = 0; Integer intLimit = 13; Integer intListSize; String []strHeader = new String[]{'"Name"', '"Account"', '"Country"','"City"','"Title"','"InvId"','"ConId"'}; String []strTemp = new String[]{}; String strTemp1 = '0'; Integer intTemp = -1; Integer intTemp1 = -1; String pagingStatus = ''; public String objAssignValues {set;get;} public PageReference AWReference() { intTemp = 0; try{ accTemp = new List<Contact>(); system.debug('ABCDEFGH $$$$$$'); for(Contact a : [Select c.Name,c.Title, c.LastName, c.FirstName, c.MailingCountry, c.MailingCity, c.Id, c.Account.Name, c.AccountId From Contact c where c.FirstName like : txtSearch +'%' or c.LastName like : txtSearch +'%']) { intCount++; if(accTemp.size() < intPageSize) { accTemp.add(a); } else { listAccount.add(accTemp); accTemp = new List<Contact>(); accTemp.add(a); } } listAccount.add(accTemp); intListSize = listAccount.size(); system.debug(intListSize); if(intCount <= intPageSize) { strTemp1 = '3'; } } catch(Exception e) { system.debug('Error Ocured: ' + e); } return null; } List<List<Account>> listAcc = new List<List<Account>>(); List<Account> AccVal; String []strAccHeader = new String[]{'"Name"', '"Country"','"Phone-No"'}; public PageReference AccRecAW() { intTemp1 = 0; // intPageSize = (pageSizeVal==null)?(20):pageSizeVal; try { AccVal = new List<Account>(); for(Account A : [Select a.Id, a.Name, a.Phone, a.BillingCountry From Account a where a.Name like : txtSearch +'%' ]) { intCount++; if(AccVal.size() < intPageSize) { AccVal.add(A); } else { listAcc.add(AccVal); AccVal = new List<Account>(); AccVal.add(A); } } listAcc.add(AccVal); intListSize = listAcc.size(); if(intCount <= intPageSize) { strTemp1 = '3'; } } catch (Exception e) { system.debug('Error Ocured: ' + e); } return null; } public PageReference AWReferenceCon() { intTemp = 0; // intPageSize = (pageSizeVal==null)?(20):pageSizeVal;
try{ accTemp = new List<Contact>(); for(Contact f : [Select c.Name,c.Title, c.LastName, c.FirstName, c.MailingCountry, c.MailingCity, c.Id, c.Account.Name, c.AccountId From Contact c where c.AccountId = : objAssignValues ]) { intCount++; if(accTemp.size() < intPageSize) { accTemp.add(f); } else { listAccount.add(accTemp); accTemp = new List<Contact>(); accTemp.add(f); } } listAccount = new List<List<Contact>>(); listAccount.add(accTemp); intListSize = listAccount.size(); if(intCount <= intPageSize) { strTemp1 = '3'; } } catch(Exception e) { system.debug('Error Ocured: ' + e); } return null; } public String[] getAccRecord() { if( intTemp1 == -1) { AccRecAW(); } strTemp.clear(); for(Integer w=0; w<listAcc[intTemp1].size(); w++) strTemp.add('["<a href=\'javascript:#\'>'+(listAcc[intTemp1][w].Name== null?'':listAcc[intTemp1][w].Name)+'</a>", "'+(listAcc[intTemp1][w].BillingCountry == null?'':listAcc[intTemp1][w].BillingCountry)+'", "'+(listAcc[intTemp1][w].Phone== null?'':listAcc[intTemp1][w].Phone)+'", "'+(listAcc[intTemp1][w].Id== null?'':listAcc[intTemp][w].Id)+'"]'); //strTemp.add('["<a href=\'javascript:#\'>'+(listAccount[intTemp][w].Name== null?'':listAccount[intTemp][w].Name)+'</a>", "'+(listAccount[intTemp][w].Account.Name== null?'':listAccount[intTemp][w].Account.Name)+'", "'+(listAccount[intTemp][w].MailingCountry== null?'':listAccount[intTemp][w].MailingCountry)+'", "'+(listAccount[intTemp][w].MailingCity== null?'':listAccount[intTemp][w].MailingCity)+'", "'+(listAccount[intTemp][w].Title== null?'':listAccount[intTemp][w].Title)+'", "'+(listAccount[intTemp][w].AccountId== null?'':listAccount[intTemp][w].AccountId)+'", "'+(listAccount[intTemp][w].Id== null?'':listAccount[intTemp][w].Id)+'"]'); //strTemp.add('["<a href=\'javascript:selLink();\'>'+listAccount[intTemp][w].Who.Name+'</a>", "'+listAccount[intTemp][w].InvestorName__c+'", "'+listAccount[intTemp][w].DealName__c+'", "'+listAccount[intTemp][w].Owner.Name+'", "'+listAccount[intTemp][w].Description+'"]'); if(strTemp == null) return new string[]{'"No Data"'}; else { pagingStatus = 'Displaying ' + (intTemp1*intPageSize+1) + ' - ' + ((intTemp1*intPageSize)+listAccount[intTemp1].size()) + ' of ' + intCount; return strTemp; } } public String getstrTemp1() { return strTemp1; } public PageReference first() { if(intTemp > 0) { strTemp1 = '0'; intTemp = 0; } return null; } public PageReference increment() { if(intTemp < intListSize - 1) { strTemp1 = '1'; intTemp++; } if(intTemp == intListSize - 1) { strTemp1 = '2'; } return null; } public PageReference decrement() { if(intTemp >=1 ) { strTemp1 = '1'; intTemp--; } if(intTemp == 0 ) { strTemp1 = '0'; } return null; } public PageReference last() { if(intTemp < intListSize - 1) { strTemp1 = '2'; intTemp = intListSize - 1; } return null; } public String getpagingStatus() { return pagingStatus; } public String[] getGetData() { if( intTemp == -1) { AWReference(); } strTemp.clear(); for(Integer w=0; w<listAccount[intTemp].size(); w++) strTemp.add('["<a href=\'javascript:#\'>'+(listAccount[intTemp][w].Name== null?'':listAccount[intTemp][w].Name)+'</a>", "'+(listAccount[intTemp][w].Account.Name== null?'':listAccount[intTemp][w].Account.Name)+'", "'+(listAccount[intTemp][w].MailingCountry== null?'':listAccount[intTemp][w].MailingCountry)+'", "'+(listAccount[intTemp][w].MailingCity== null?'':listAccount[intTemp][w].MailingCity)+'", "'+(listAccount[intTemp][w].Title== null?'':listAccount[intTemp][w].Title)+'", "'+(listAccount[intTemp][w].AccountId== null?'':listAccount[intTemp][w].AccountId)+'", "'+(listAccount[intTemp][w].Id== null?'':listAccount[intTemp][w].Id)+'"]'); //strTemp.add('["<a href=\'javascript:selLink();\'>'+listAccount[intTemp][w].Who.Name+'</a>", "'+listAccount[intTemp][w].InvestorName__c+'", "'+listAccount[intTemp][w].DealName__c+'", "'+listAccount[intTemp][w].Owner.Name+'", "'+listAccount[intTemp][w].Description+'"]'); if(strTemp == null) return new string[]{'"No Data"'}; else { pagingStatus = 'Displaying ' + (intTemp*intPageSize+1) + ' - ' + ((intTemp*intPageSize)+listAccount[intTemp].size()) + ' of ' + intCount; return strTemp; } } public String[] getContactData() { intTemp = -1; AWReferenceCon(); { strTemp.add('["<a href=\'javascript:#\'>'+(listAccount[intTemp][w].Name== null?'':listAccount[intTemp][w].Name)+'</a>", "'+(listAccount[intTemp][w].Account.Name== null?'':listAccount[intTemp][w].Account.Name)+'", "'+(listAccount[intTemp][w].MailingCountry== null?'':listAccount[intTemp][w].MailingCountry)+'", "'+(listAccount[intTemp][w].MailingCity== null?'':listAccount[intTemp][w].MailingCity)+'", "'+(listAccount[intTemp][w].Title== null?'':listAccount[intTemp][w].Title)+'", "'+(listAccount[intTemp][w].AccountId== null?'':listAccount[intTemp][w].AccountId)+'", "'+(listAccount[intTemp][w].Id== null?'':listAccount[intTemp][w].Id)+'"]'); } //strTemp.add('["<a href=\'javascript:selLink();\'>'+listAccount[intTemp][w].Who.Name+'</a>", "'+listAccount[intTemp][w].InvestorName__c+'", "'+listAccount[intTemp][w].DealName__c+'", "'+listAccount[intTemp][w].Owner.Name+'", "'+listAccount[intTemp][w].Description+'"]'); if(strTemp == null) return new string[]{'"No Data"'}; else { pagingStatus = 'Displaying ' + (intTemp*intPageSize+1) + ' - ' + ((intTemp*intPageSize)+listAccount[intTemp].size()) + ' of ' + intCount; return strTemp; } } public String[] getGetHeader() { return strHeader; } public String[] getAccHeader() { return strAccHeader; } }
- Ruchie
- January 13, 2009
- Like
- 0
- Continue reading or reply
How to get the rowIndex of the Selected Row in a Visualforce DataTable
- Ruchie
- December 29, 2009
- Like
- 0
- Continue reading or reply
How to call the body- onload() javascript function in the VisualForce page.
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/11.1/connection.js"></script>
<apex:pageBlock>
<apex:form>
<body onload="init();">
<table width="100%">
<tr>
<td>
<input type="text" id="txtName" />
<input type="button" value="Save" />
</td>
</tr>
</table>
</body>
<script language="javascript">
sforce.connection.sessionId = '{!$Api.Session_ID}';
{
alert('hi');
}
</script>
</apex:form>
- Ruchie
- December 26, 2008
- Like
- 0
- Continue reading or reply
Dependent Picklist
- Ruchie
- October 01, 2008
- Like
- 0
- Continue reading or reply
How to call the body- onload() javascript function in the VisualForce page.
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/11.1/connection.js"></script>
<apex:pageBlock>
<apex:form>
<body onload="init();">
<table width="100%">
<tr>
<td>
<input type="text" id="txtName" />
<input type="button" value="Save" />
</td>
</tr>
</table>
</body>
<script language="javascript">
sforce.connection.sessionId = '{!$Api.Session_ID}';
{
alert('hi');
}
</script>
</apex:form>
- Ruchie
- December 26, 2008
- Like
- 0
- Continue reading or reply