-
ChatterFeed
-
1Best Answers
-
4Likes Received
-
0Likes Given
-
41Questions
-
41Replies
Multislect picklist using in Apex
Have a visualforce page with a multi select picklist.
<apex:selectList value="{!selectedGroups}" size="10" multiselect="true">
I then need to loop over the comma delimited output selectedGroups in apex but i am not sure how to go about this.
Any suggestions?
Thanks
-
- V100
- January 17, 2013
- Like
- 0
- Continue reading or reply
Visualforce page with OOB style Sharing
I'll need to select Public Groups or Roles or Roles & Subordinates based on which the left column will be populated will all the public groups if public group is selected. and then add /remove button to add and remove to & from the right column.
.
Any idea how this can be build with Visualforce? Code samples if any will be appeciated.
-
- rohitr
- August 25, 2014
- Like
- 0
- Continue reading or reply
Apex Iframe for standard salesforce pages
I tried
<apex:iframe height="800px" id="theIframe" src="/home/home.jsp" width="100%" frameborder="true"/>
The above iframe gives me a blank iframe.
But if u use
<apex:iframe height="800px" id="theIframe" src="/apex/SomeVisualforcePage" width="100%" frameborder="true"/>
i can see the visualforce paqe inside the current page.
Any browser settings or Salesforce settings need to be changed?
Any help would be appreciated.
Thanks in Advance.
-
- rohitr
- June 20, 2014
- Like
- 0
- Continue reading or reply
Create a filter logic in visualforce
Any code samples?
thanks in advance
-
- rohitr
- June 13, 2014
- Like
- 1
- Continue reading or reply
Custom Account Merge
If then please share..
Thanks in Advance
-
- rohitr
- June 09, 2014
- Like
- 0
- Continue reading or reply
Sign in to salesforce from salesforce1 app
Idea is to have a link on salesforce1 app and then on click of the link, it should open salesforce org in the mobilwe browser without having the user to login again.
Thanks is Advance
-
- rohitr
- May 30, 2014
- Like
- 0
- Continue reading or reply
Button CSS for Custom Console Component
I've created a custom console component. And those components are available on the console as buttons. What i need is some tooltip to be shown on the console buttons at the bottom.
I saw Button CSS option while creating the console component. But not sure the format to put there?
The highlighted region shows the custom console component button css option. What should i put there?
Thanks in advance.
-
- rohitr
- March 26, 2014
- Like
- 0
- Continue reading or reply
Google Timeline Charts Date Format
<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('example1');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'Status' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([
[ 'Washington', new Date(1789, 3, 29), new Date(1797, 2, 3) ],
[ 'Adams', new Date(1797, 2, 3), new Date(1801, 2, 3) ],
[ 'Jefferson', new Date(1801, 2, 3), new Date(1900, 2, 1)]]);
chart.draw(dataTable);
}
</script>
The above is code from google and it renders a chart. But i need to have date from my controller. I tried using a date variable after declaring as get set. The variable was then used like this {!dateVariable}. Even then i couldn't make it work.
Is there any specific date format for timeline chart data?
Thanks in advance.
-
- rohitr
- March 23, 2014
- Like
- 0
- Continue reading or reply
TwitterForce - Visualforce Error - TwitterForce.TwitterException:
Followed all steps as they have mentioned. But on the twitter page, once i give credentials and click on login button, I get the below error.
Class.TwitterForce.execute: line 75, column 1
Class.TwitterForce.checkCreds: line 88, column 1
Class.TwitterForce.<init>: line 27, column 1
Class.TwitterController: line 19, column 1
Any light on this?
Thanks in Advance,
RR
-
- rohitr
- March 23, 2014
- Like
- 0
- Continue reading or reply
Pass Value from Standard controller Constructor to global static method
global with sharing class CustomHighlightsPanelController {
public Account accountInstance;
global static String accountName {get; set;}
global static String primeTabValue {get; set;}
public CustomHighlightsPanelController(ApexPages.StandardController controller) {
accountInstance = (Account)controller.getRecord();
accountName = accountInstance.Id;
System.debug('_______##############______'+accountName);
}
public PageReference FetchTabId() {
return null;
}
@RemoteAction
global static Premium_Payment__c[] loadPremiumPaidRecs() {
List<Premium_Payment__c> premiumPaymentList = new List<Premium_Payment__c>();
premiumPaymentList = [SELECT Id, Customer_Name__c, Paid_Premium__c, Policy__c, Premium_Paid_Date__c,Premium_Paid_Month_Year__c
FROM Premium_Payment__c WHERE Customer_Name__c =: accountName];
return premiumPaymentList;
}
}
accountName inside the SOQL query is getting null. but the variable accountName in the system.debug line gives a value.
How can i pass the contructor variable to the global static method which is defined as @RemoteAction.
-
- rohitr
- March 18, 2014
- Like
- 1
- Continue reading or reply
Pass Console Id (Primary Object Id) to controller.
I'm getting the same on the javascript. But cannot pass. Tried using hiddenfield and actionfunction.
javascript:
function testGetFocusedPrimaryTabObjectId() {
sforce.console.getFocusedPrimaryTabObjectId(showObjectId);
}
var showObjectId = function showObjectId(result) {
//Display the object ID
invokeController(result.id);
alert('Object ID: ' + result.id);
};
page:
<apex:actionFunction name="invokeController" action="{!save}" reRender="outtext">
<apex:param value="{!primeTabValue}"/>
</apex:actionFunction>
this is my code and in controller am using get; set; for the primeTabValue variable.
Am able to get the id on alert box. but not on the variable.
Any help would be much appreciated.
-
- rohitr
- March 06, 2014
- Like
- 1
- Continue reading or reply
Salesforce Service Console Custom Component
I have few custom components at the bottom of the console screen. I've created custom console components from Customize>Console>Custom Console Components.
What I need is, on the console screen hovering over the images for the custom console components a tooltip should be displayed. I know we can have a text along the image. But how to show a tooltip. While creating a component there is a field "Button CSS". Do i need to put something here? If then what?
Thanks in advance,
RR
-
- rohitr
- February 27, 2014
- Like
- 1
- Continue reading or reply
My inline Visualforce page doesn't load
In page layout the vf page is available in edit and detail layout. But in either case the VF page doesn't appear.
Am using a custom object as a standard controller in the VF page.
Can someone let me know what the issue is?
-
- rohitr
- February 12, 2014
- Like
- 0
- Continue reading or reply
CTI Demo Adapter Nothing Happens
On Clicking the "Connect CTI Adapter" button, nothing happens.
Can someone let me know whats is happening here.
Thanks In Advance
-
- rohitr
- December 31, 2014
- Like
- 0
- Continue reading or reply
Report Filter for Last Login
Hi All,
I need to create a report with users who has not logged in between last 30 days and Last 60 days.
Please help me with the filter condition. I tried Last Login less than "LAST 30 DAYS" AND Last Login greater than "LAST 60 DAYS" But not working. Please provide anyother alternative work around.
Thanks in Advance.
-
- rohitr
- November 20, 2013
- Like
- 0
- Continue reading or reply
Trigger on ContactFeed
Just came to know that Trigger over contact field is not permitted.
Is there any alternative to ContactFeed trigger. I want the latest contactfeed to appear on the corresponding contact record.
-
- rohitr
- July 30, 2013
- Like
- 0
- Continue reading or reply
Event records doesn't get updated with data loader
I've a trigger on Event which is fired on insert and update. The trigger updates couple of fields on contact based on event record.
For eg.
There is a field Number of events, latest event.
I was trying to update the historical records too for which i updated a field on event. (this field is just to inititate the update and hence the trigger).
But I found that when i update all the event records, it just doesn't update fields on contact, but i see the field is updated on event records.
What is happening. Any clues?
Number Event records :1018
Data loader batch size: 200
Bulk API: unchecked.
Thanks in Advance
-
- rohitr
- June 19, 2013
- Like
- 0
- Continue reading or reply
Test Class for class with AsyncApexJob
Hi,
I've the elow method which is called on a command button from a VF page. It is for the admin to run the batch manually whenever required.
Please help me how to create a test class for the same.
i tried creating the test class by created an AsyncApexJob record, but it gives error saying that the fields are not writeable.
public List<AsyncApexJob> getBatchJob() { String kstCreatedDateMod; String kstCompletedDateMod; List<AsyncApexJob> batchJob = [SELECT CreatedDate, JobItemsProcessed, Status, ExtendedStatus, NumberOfErrors, CompletedDate, JobType, TotalJobItems, ApexClassId FROM AsyncApexJob where id = : batchProcessId ]; for(AsyncApexJob aaj : batchJob){ if(aaj.CreatedDate == null){ kstCreatedDate = null; } else { kstCreatedDateMod = String.valueOf(aaj.CreatedDate); kstCreatedDate = kstCreatedDateMod +' KST'; } if(aaj.CompletedDate == null){ kstCompletedDate = null; } else { kstCompletedDateMod = String.valueOf(aaj.CompletedDate); kstCompletedDate = kstCompletedDateMod +' KST'; } if(aaj.status == 'Queued') { ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Job Queued... Please wait..')); } else if(aaj.Status == 'Processing') { ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Batch Job Running... Please wait..')); } else if((aaj.Status == 'Completed') && (aaj.NumberOfErrors == 0)){ ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM, 'Batch Job Completed!')); } else if((aaj.NumberOfErrors > 0) || (aaj.Status == 'Failed') || (aaj.Status == 'Aborted')){ ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Error Processing Job. Please Contact Administrator')); } } return batchJob; }
Ay help would be highly appreciated.
Thanks in Advance
-
- rohitr
- June 14, 2013
- Like
- 0
- Continue reading or reply
Error on Trigger Test Class
Hi Guys,
Can anyone check and tell me what this error is? It happend when running a test class for a trigger.
"Failure Message: "System.SecurityException: Empty key", Failure Stack Trace: "(System Code)""
Thanks in Advance
-
- rohitr
- June 05, 2013
- Like
- 0
- Continue reading or reply
Create CaseMilestone Record in my developer org
I was learning about cases and casemilestone, but could not find how I can create a casemilestone record. I checked with Entitlement Implementation guide. Still I could find a way to create a record.
Can any one suggest step by step approach for to create a casemilestone record?
Thanks in Advance3
-
- rohitr
- June 03, 2013
- Like
- 0
- Continue reading or reply
Pass a variable from controller method to Visualforce
Hi All,
Please let me know how to pass a variable defined in a method inside a controller to the VF page.
@RemoteAction global static AggregateResult[] loadOpportunity() { closingToday = 0; Date mydate = System.today(); Date mydate1 = System.today().addDays(-45); Date mydate2 = System.today().addDays(45); List<AggregateResult> OppList = new List<AggregateResult>(); OppList = [SELECT StageName, CloseDate, Sum(Amount) amountSum FROM Opportunity WHERE OwnerId =: OwnerId AND StageName =: StageList AND CloseDate >: myDate1 AND CloseDate <: myDate2 GROUP BY StageName, CloseDate]; for(AggregateResult opp :OppList) { if(opp.get('CloseDate') = myDate) { closingToday = closingToday +1; } } }
I want to use this closingToday variable to use on the VF page.
<p> Numner of Opportunity Closing Today is: {!ClosingToday}</p>
How can i declare this variable in the controller?
I'm using google charting for which @RemoteAction annotation is used.
Any help would be appreciated.
Thanks in Advance
-
- rohitr
- May 29, 2013
- Like
- 0
- Continue reading or reply
Create a filter logic in visualforce
Any code samples?
thanks in advance
-
- rohitr
- June 13, 2014
- Like
- 1
- Continue reading or reply
Pass Value from Standard controller Constructor to global static method
global with sharing class CustomHighlightsPanelController {
public Account accountInstance;
global static String accountName {get; set;}
global static String primeTabValue {get; set;}
public CustomHighlightsPanelController(ApexPages.StandardController controller) {
accountInstance = (Account)controller.getRecord();
accountName = accountInstance.Id;
System.debug('_______##############______'+accountName);
}
public PageReference FetchTabId() {
return null;
}
@RemoteAction
global static Premium_Payment__c[] loadPremiumPaidRecs() {
List<Premium_Payment__c> premiumPaymentList = new List<Premium_Payment__c>();
premiumPaymentList = [SELECT Id, Customer_Name__c, Paid_Premium__c, Policy__c, Premium_Paid_Date__c,Premium_Paid_Month_Year__c
FROM Premium_Payment__c WHERE Customer_Name__c =: accountName];
return premiumPaymentList;
}
}
accountName inside the SOQL query is getting null. but the variable accountName in the system.debug line gives a value.
How can i pass the contructor variable to the global static method which is defined as @RemoteAction.
-
- rohitr
- March 18, 2014
- Like
- 1
- Continue reading or reply
Pass Console Id (Primary Object Id) to controller.
I'm getting the same on the javascript. But cannot pass. Tried using hiddenfield and actionfunction.
javascript:
function testGetFocusedPrimaryTabObjectId() {
sforce.console.getFocusedPrimaryTabObjectId(showObjectId);
}
var showObjectId = function showObjectId(result) {
//Display the object ID
invokeController(result.id);
alert('Object ID: ' + result.id);
};
page:
<apex:actionFunction name="invokeController" action="{!save}" reRender="outtext">
<apex:param value="{!primeTabValue}"/>
</apex:actionFunction>
this is my code and in controller am using get; set; for the primeTabValue variable.
Am able to get the id on alert box. but not on the variable.
Any help would be much appreciated.
-
- rohitr
- March 06, 2014
- Like
- 1
- Continue reading or reply
Salesforce Service Console Custom Component
I have few custom components at the bottom of the console screen. I've created custom console components from Customize>Console>Custom Console Components.
What I need is, on the console screen hovering over the images for the custom console components a tooltip should be displayed. I know we can have a text along the image. But how to show a tooltip. While creating a component there is a field "Button CSS". Do i need to put something here? If then what?
Thanks in advance,
RR
-
- rohitr
- February 27, 2014
- Like
- 1
- Continue reading or reply
Apex Iframe for standard salesforce pages
I tried
<apex:iframe height="800px" id="theIframe" src="/home/home.jsp" width="100%" frameborder="true"/>
The above iframe gives me a blank iframe.
But if u use
<apex:iframe height="800px" id="theIframe" src="/apex/SomeVisualforcePage" width="100%" frameborder="true"/>
i can see the visualforce paqe inside the current page.
Any browser settings or Salesforce settings need to be changed?
Any help would be appreciated.
Thanks in Advance.
- rohitr
- June 20, 2014
- Like
- 0
- Continue reading or reply
Custom Account Merge
If then please share..
Thanks in Advance
- rohitr
- June 09, 2014
- Like
- 0
- Continue reading or reply
Pass Value from Standard controller Constructor to global static method
global with sharing class CustomHighlightsPanelController {
public Account accountInstance;
global static String accountName {get; set;}
global static String primeTabValue {get; set;}
public CustomHighlightsPanelController(ApexPages.StandardController controller) {
accountInstance = (Account)controller.getRecord();
accountName = accountInstance.Id;
System.debug('_______##############______'+accountName);
}
public PageReference FetchTabId() {
return null;
}
@RemoteAction
global static Premium_Payment__c[] loadPremiumPaidRecs() {
List<Premium_Payment__c> premiumPaymentList = new List<Premium_Payment__c>();
premiumPaymentList = [SELECT Id, Customer_Name__c, Paid_Premium__c, Policy__c, Premium_Paid_Date__c,Premium_Paid_Month_Year__c
FROM Premium_Payment__c WHERE Customer_Name__c =: accountName];
return premiumPaymentList;
}
}
accountName inside the SOQL query is getting null. but the variable accountName in the system.debug line gives a value.
How can i pass the contructor variable to the global static method which is defined as @RemoteAction.
- rohitr
- March 18, 2014
- Like
- 1
- Continue reading or reply
Salesforce Service Console Custom Component
I have few custom components at the bottom of the console screen. I've created custom console components from Customize>Console>Custom Console Components.
What I need is, on the console screen hovering over the images for the custom console components a tooltip should be displayed. I know we can have a text along the image. But how to show a tooltip. While creating a component there is a field "Button CSS". Do i need to put something here? If then what?
Thanks in advance,
RR
- rohitr
- February 27, 2014
- Like
- 1
- Continue reading or reply
My inline Visualforce page doesn't load
In page layout the vf page is available in edit and detail layout. But in either case the VF page doesn't appear.
Am using a custom object as a standard controller in the VF page.
Can someone let me know what the issue is?
- rohitr
- February 12, 2014
- Like
- 0
- Continue reading or reply
CTI Demo Adapter Nothing Happens
On Clicking the "Connect CTI Adapter" button, nothing happens.
Can someone let me know whats is happening here.
Thanks In Advance
- rohitr
- December 31, 2014
- Like
- 0
- Continue reading or reply
Event records doesn't get updated with data loader
I've a trigger on Event which is fired on insert and update. The trigger updates couple of fields on contact based on event record.
For eg.
There is a field Number of events, latest event.
I was trying to update the historical records too for which i updated a field on event. (this field is just to inititate the update and hence the trigger).
But I found that when i update all the event records, it just doesn't update fields on contact, but i see the field is updated on event records.
What is happening. Any clues?
Number Event records :1018
Data loader batch size: 200
Bulk API: unchecked.
Thanks in Advance
- rohitr
- June 19, 2013
- Like
- 0
- Continue reading or reply
Trigger on Attachments
I have the requirement create a trigger on Attachment object, when i add new attachment ,check the attchment alredy aded or not?
i write like this ,please suggest me, is it correct or not?
trigger dntAddDuplicateAttchmnt on Attachment (before insert) {
if(trigger.isBefore){
for(Attachment atch:Trigger.new){
String parentID=atch.ParentId;
String atchName=atch.Name;
List<Attachment> listatch=[SELECT Name,ParentId FROM Attachment];
if(parentID==trigger.oldmap.get(parentID).ParentId && atchName==trigger.oldmap.get(parentID).Name){
atch.addError(' This file already having with same name in your attachmntes');
}
else if{
for(Attachment at:listatch){
if(at.Name==atchName && at.ParentId==parentID){
atch.addError('This file already having with same name in your attachmntes');
}
}
}
}
}
}
- bellpoll
- June 14, 2013
- Like
- 0
- Continue reading or reply
Loop through fieldname
Please help me...
I have 20 E-mail fields named Email1__c, Email2__c, Email3__c,.....Email20__c.
What I want to do is loop thorugh these fields and input value.
Hereis my code.
Alerts__c alerts =new Alerts__c(); for(integer j=1;j==MailList.size();j++){ String iStr = String.Valueof(j); String fieldname='Email'+iStr+'__c'; alerts.get(fieldname)='test@test.com'; }
But the following error occured.
Expression cannot be assigned
Please tell me how to solve this problem...
Thanks in advance for your help.
Anna
- AnnaT
- June 14, 2013
- Like
- 0
- Continue reading or reply
How to pre populate value while clicking new custom button in child object?
Hi All,
I want to pre populate values of master record information in to my while clicking new btn in Related list?How to do this explain with one example?pls help me...Urgent
Thanks,
Vicky
- vickySFDC
- June 13, 2013
- Like
- 0
- Continue reading or reply
- Vinny12
- June 02, 2013
- Like
- 0
- Continue reading or reply
Pass a variable from controller method to Visualforce
Hi All,
Please let me know how to pass a variable defined in a method inside a controller to the VF page.
@RemoteAction global static AggregateResult[] loadOpportunity() { closingToday = 0; Date mydate = System.today(); Date mydate1 = System.today().addDays(-45); Date mydate2 = System.today().addDays(45); List<AggregateResult> OppList = new List<AggregateResult>(); OppList = [SELECT StageName, CloseDate, Sum(Amount) amountSum FROM Opportunity WHERE OwnerId =: OwnerId AND StageName =: StageList AND CloseDate >: myDate1 AND CloseDate <: myDate2 GROUP BY StageName, CloseDate]; for(AggregateResult opp :OppList) { if(opp.get('CloseDate') = myDate) { closingToday = closingToday +1; } } }
I want to use this closingToday variable to use on the VF page.
<p> Numner of Opportunity Closing Today is: {!ClosingToday}</p>
How can i declare this variable in the controller?
I'm using google charting for which @RemoteAction annotation is used.
Any help would be appreciated.
Thanks in Advance
- rohitr
- May 29, 2013
- Like
- 0
- Continue reading or reply
How to get at the onclick event of a custom console component's button.
Hi there,
I have added a custom console component to our Service Cloud console but what I'm trying to do is that when I click on the button to launch the component, I want to run a method in my controller that my visualforce page is calling. This component is made up of page that provides a quick view into our support team's cases queue, and a controller with methods that rerun the query to get a realtime view of the cases in the queue.
My question is, how do I get at the onclick event for this button? I have searched around for answers but so far I have been unable to find any. My goal is to use this console component as a quick view into our support teams cases queue so that wherever they are in the console (in a case, contact, organisation record, etc..) when they click on this component it will automatically refresh the view of the support cases that I'm displaying in this component.
So far I have only been able to get as far as adding some output text to my page and firing this refresh using the onlclick and onmouseover event. This isn't ideal for our team's requirements so ideally when they click on this component I would like to be able to fire the refresh then?
Any ideas on this please?
All help is greatly appreciated as always!
Thanks so much in advance to anyone taking the time to read this and offer assistance.
Kindest Regards,
Brian.
- kiwitrotter
- March 29, 2013
- Like
- 0
- Continue reading or reply
Draw 2 charts in a VF page using Google Charts
Hi,
I've created a VF page where i'm suing google charts API.
Source of my information :http://developer.force.com/cookbook/recipe/easy-visualforce-charts-with-javascript-remoting--google-charts-api
Is it possible to have 2 charts on the same page?
Thanks in Advance,
Rohit
- rohitr
- February 28, 2013
- Like
- 0
- Continue reading or reply
- krishnag
- July 08, 2010
- Like
- 0
- Continue reading or reply