-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
24Questions
-
34Replies
Change style classs of the html elment based on the Selection of checkbox?
<li id="li1">
<a href="javascript:void(0)">
<apex:image url="{!URLFOR($Resource.PMO,'/PMO/images/sibarimg1.png')}"/>
<span>Availability</span>
</a>
<ul class="dropdown">
<apex:SelectCheckboxes value="{!selectedAvailability}" layout="pageDirection">
<apex:selectoption itemlabel="0% (Available)" itemvalue="0" id="opt1" onclick="changeclass()"/>
<apex:selectoption itemlabel="25%" itemvalue="75" id="opt2"/>
<apex:selectOption itemLabel="50%" itemValue="50" id="opt3"/>
<apex:selectOption itemLabel="75%" itemValue="25" id="opt4"/>
<apex:selectOption itemLabel="100% (Not Available)" itemValue="100" id="opt5"/>
</apex:SelectCheckboxes>
</ul>
<!--submenu finish-->
</li>
I want to change style of <li> based on the selection of any of the selectoption. Any ideas, how can we do that?
- Koustubh Kulkarni
- November 02, 2015
- Like
- 0
- Continue reading or reply
How to display records on a pageblocktable based on the value of a picklist field?
<apex:page standardController="contact" extensions="cntrl_bulk_test"> <!-- controller="cntrl_bulk_test" -->
<apex:form id="frm">
<apex:pageBlock id="pgBlkSkilllevel">
<apex:pageBlockTable value="{!lsttopiclevel1 }" var="a">
<apex:column headerValue="Skill Group">
<apex:outputField value="{!a.Skill_Group__c}"/>
<!-- <apex:inputfield value="{!a.Skill_Group__c}"/> -->
</apex:column>
<apex:column headerValue="Topic Name">
<apex:outputField value="{!a.Topic__r.Name}"/>
</apex:column>
<apex:column headerValue="Skill Target">
<apex:outputField value="{!a.skill_level_expected__c}"/>
</apex:column>
<apex:column headerValue="Skill Level">
<apex:inputfield value="{!a.Skill_Level__c}"/>
</apex:column>
<apex:column headerValue="Year">
<apex:inputfield value="{!a.Year__c}"/>
</apex:column>
<apex:column headerValue="Quarter">
<apex:inputfield value="{!a.Quarter__c}"/>
</apex:column>
</apex:pageBlockTable>
<br/>
<apex:commandButton value="Save" action="{!saveSkillLevelRating}" /> <!--onclick="window.top.location='/{!Contact.id}'; return false"-->
</apex:pageBlock>
</apex:form>
</apex:page>
controller-
public with sharing class cntrl_bulk_test
{
Public static Id EmployeeId {get;set;}
Public List<Contact_Topic_Scale__c> lsttopiclevel{get;set;}
list<Contact_Topic_Scale__c> LstSkilllevels = new list<Contact_Topic_Scale__c>();
public List<Contact_Topic_Scale__c> lsttopiclevel1 {get;set;}
public ApexPages.StandardController controller {get; set;}
public cntrl_bulk_test(ApexPages.StandardController controller)
{
this.controller = controller;
EmployeeId =system.currentpagereference().getparameters().get('id');
Contact coninfo = [select name from contact where id =: controller.getId()];
lsttopiclevel1 = new List<Contact_Topic_Scale__c>([SELECT Id, Core_Skill_Set__c,Contact_Skill_Set__c,Delta_Actual_vs_Expected__c,Employee__c,Quarter__c,Skill_Group__c,Skill_Level__c,skill_level_expected__c,Year__c,Topic__r.Name FROM Contact_Topic_Scale__c where Employee__c =: coninfo.name ORDER BY Skill_Group__c ASC ]);
}
Public PageReference saveSkillLevelRating()
{
//controller.save(); // call save method from standart controller
//System.debug('*******saveSkillLevelRating0*******');
//PageReference pageRef = system.currentpagereference();
PageReference pageRef = ApexPages.currentPage();
System.debug('********************************************************************************lsttopiclevel=' + lsttopiclevel1 );
update lsttopiclevel1 ;
System.debug('********************************************************************************lsttopiclevel=' + lsttopiclevel1 );
return null;
//return pageRef ;
}
}
- Koustubh Kulkarni
- October 14, 2015
- Like
- 0
- Continue reading or reply
Bulk update record from VF page?
VF page-
<apex:page standardController="contact" extensions="cntrl_bulk_test"> <!-- controller="cntrl_bulk_test" -->
<apex:form >
<apex:pageBlock id="pgBlkSkilllevel">
<apex:pageBlockTable value="{!lsttopiclevel}" var="a">
<apex:column headerValue="Skill Group">
<apex:outputField value="{!a.Skill_Group__c}"/>
<!-- <apex:inputfield value="{!a.Skill_Group__c}"/> -->
</apex:column>
<apex:column headerValue="Topic Name">
<apex:outputField value="{!a.Topic__r.Name}"/>
</apex:column>
<apex:column headerValue="Skill Target">
<apex:outputField value="{!a.skill_level_expected__c}"/>
</apex:column>
<apex:column headerValue="Skill Level">
<apex:inputfield value="{!a.Skill_Level__c}"/>
</apex:column>
<apex:column headerValue="Year">
<apex:inputfield value="{!a.Year__c}"/>
</apex:column>
<apex:column headerValue="Quarter">
<apex:inputfield value="{!a.Quarter__c}"/>
</apex:column>
</apex:pageBlockTable>
<br/>
<apex:commandButton value="Save" action="{!saveSkillLevelRating}" reRender="pgBlkSkilllevel"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller-
public with sharing class cntrl_bulk_test
{
Public static Id EmployeeId {get;set;}
Public static List<Contact_Topic_Scale__c> lsttopiclevel{get;set;}
public cntrl_bulk_test(ApexPages.StandardController controller)
{
EmployeeId =system.currentpagereference().getparameters().get('id');
Contact coninfo = [select name from contact where id =: EmployeeId];
lsttopiclevel = new List<Contact_Topic_Scale__c>([SELECT Id, Core_Skill_Set__c,Contact_Skill_Set__c,Delta_Actual_vs_Expected__c,Employee__c,Quarter__c,Skill_Group__c,Skill_Level__c,skill_level_expected__c,Year__c,Topic__r.Name FROM Contact_Topic_Scale__c where Employee__c =: coninfo.name ORDER BY Skill_Group__c ASC ]);
}
Public PageReference saveSkillLevelRating()
{
System.debug('*******saveSkillLevelRating0*******');
PageReference pageRef = ApexPages.currentPage();
update lsttopiclevel;
return pageRef ;
}
}
Can anyone help me with this issue?
- Koustubh Kulkarni
- October 12, 2015
- Like
- 0
- Continue reading or reply
Need help to write test class?
public class my_groups
{
Set<Id> setGroupMemberId = new Set<Id>();
public cntrl_my_groups()
{
List<CollaborationGroup> lstGroup = new List<CollaborationGroup>();
Id currentUserId = UserInfo.getUserId();
List<CollaborationGroupMember> lstGroupMember = [SELECT CollaborationGroupId,MemberId FROM CollaborationGroupMember where MemberId =:currentUserId];
for(CollaborationGroupMember gm : lstGroupMember)
{
setGroupMemberId.add(gm.CollaborationGroupId);
}
}
public list<CollaborationGroup> get_my_group
{
get
{
if(setGroupMemberId.size() > 0)
get_my_group = [SELECT Id,Name FROM CollaborationGroup where Id in: setGroupMemberId];
return get_my_group;
}
set;
}
}
Any kind of help will be Appreciated.Thanks
- Koustubh Kulkarni
- October 09, 2015
- Like
- 0
- Continue reading or reply
Display list of chatter groups in which current user is a member in a community home page component?
- Koustubh Kulkarni
- October 05, 2015
- Like
- 1
- Continue reading or reply
Forgot password Link to the community(via mail) returning wrong community URL?
So what should I do to fix this issue? Any kind of help will be appreciated.Thanks.
- Koustubh Kulkarni
- September 28, 2015
- Like
- 0
- Continue reading or reply
Forgot password Email for community sending me wrong link for reset password?
- Koustubh Kulkarni
- September 25, 2015
- Like
- 0
- Continue reading or reply
How to do javascript remoting without visualforce page?
- Koustubh Kulkarni
- September 14, 2015
- Like
- 0
- Continue reading or reply
How to implemet search functionality in site.com site?
- Koustubh Kulkarni
- September 08, 2015
- Like
- 0
- Continue reading or reply
want to create community login page in html, how to provide community login through html page(authentication and validation)?
- Koustubh Kulkarni
- September 07, 2015
- Like
- 0
- Continue reading or reply
How to call apex method/class from site.com page?
- Koustubh Kulkarni
- September 04, 2015
- Like
- 0
- Continue reading or reply
how to create a custom communities login page using site.com (now called community designer)? It will be useful for business users who want to create a 100% custom branded community with site.com instead of VisualForce+APEX.
- Koustubh Kulkarni
- September 03, 2015
- Like
- 0
- Continue reading or reply
How to implement the functionality of the community login page through block in site.com?
Thanks.
- Koustubh Kulkarni
- September 03, 2015
- Like
- 0
- Continue reading or reply
How to stop insertion of record based on a criteria?
If u have taken leave on certain date(e.g. 1st may) and it got approved and then again if you try to apply for another leave on the same date(1st may) then your application will not be submitted.How to do that?
please Help.
- Koustubh Kulkarni
- September 01, 2015
- Like
- 0
- Continue reading or reply
Can anyone tell me about knowledge and articles in salesforce with example?
- Koustubh Kulkarni
- September 01, 2015
- Like
- 0
- Continue reading or reply
How to input multiple records through VF form while record's all fields are different but one field is same?
- Koustubh Kulkarni
- August 27, 2015
- Like
- 0
- Continue reading or reply
Create multiple records of same other fields but different one field?
I am new to salesforce. I have one junction object called allocation__c which is junction between contact and project__c. Allocation has various fields. after selecting time period(1 week,2 week,1 month,2 months etc.) i want to generate multiple records with same field values but each record for only one week.i.e. if i select 1 month then there should be four records with other parameters remaining same but just change in start and end date. how can we do that??
- Koustubh Kulkarni
- August 20, 2015
- Like
- 0
- Continue reading or reply
how to change roll up summary field value based on the picklist value?
- Koustubh Kulkarni
- August 11, 2015
- Like
- 0
- Continue reading or reply
I cant retrieve list of records from the custom object on VF page?
I have one custom object named EmplyeeTopicRating__c is on detail side of contact standard object.Based on the name of contact i want to fetch list of records from EmplyeeTopicRating__c. so i have written custom controller for it.It didnt give me any error but it doesnt fetches values on EmplyeeTopicRating__c object.so please give me solution.
**************my controller***********************************
public class contactextention
{
public contact cont{get;set;}
public PageReference save()
{ update cont;
return null;
}
public contactextention() {
String acctId = ApexPages.currentPage().getParameters().get('id');
cont = [Select Name From contact Where Id = :acctId];
}
public list<EmplyeeTopicRating__c> ratings1
{ get {
ratings1 =[select Employee_name__c,Employee_name__r.ContactRole__r.Name,TopicPriorityRecord__r.Priority__c,quarter__c,Ratings__c,Year__c,
TopicPriorityRecord__r.Topic_Name__r.Group_Name__r.Name,TopicPriorityRecord__r.Topic_Name__r.Name from EmplyeeTopicRating__c where Employee_name__c=:cont.name];
return ratings1;
}
set;
}
public String getGreeting()
{
return 'Hello ' + cont.name + ' (' + cont.id + ')';
}
}
*******************VF page***********************
<apex:page controller="contactextention">
{!Greeting}
<apex:form >
<Apex:pageBlock >
<apex:pageblockButtons >
<apex:commandButton action="{!save}" value="save" />
</apex:pageblockButtons>
<apex:pageBlockSection >
<apex:pageBlockTable value="{!ratings1}" var="etr">
<apex:column headerValue="Year">
<apex:inputField value="{!etr.Year__c}"/>
</apex:column>
<apex:column headerValue="Quarter">
<apex:outputField value="{!etr.quarter__c}"/>
</apex:column>
<apex:column headerValue="Role name">
<apex:outputField value="{!etr.TopicPriorityRecord__r.Role__r.Name}"/>
</apex:column>
<apex:column headerValue="Priority no">
<apex:outputField value="{!etr.TopicPriorityRecord__r.Priority__c}"/>
</apex:column>
<apex:column headerValue="Ratings">
<apex:inputField value="{!etr.Ratings__c}"/>
</apex:column>
<apex:column headerValue="Topic Name">
<apex:outputField value="{!etr.TopicPriorityRecord__r.Topic_Name__r.Name}"/>
</apex:column>
</Apex:pageblockTable>
</apex:pageBlockSection>
</Apex:pageBlock>
</apex:form>
</apex:page>
please show whats wrong in the code
- Koustubh Kulkarni
- August 10, 2015
- Like
- 0
- Continue reading or reply
Display list of chatter groups in which current user is a member in a community home page component?
- Koustubh Kulkarni
- October 05, 2015
- Like
- 1
- Continue reading or reply
Change style classs of the html elment based on the Selection of checkbox?
<li id="li1">
<a href="javascript:void(0)">
<apex:image url="{!URLFOR($Resource.PMO,'/PMO/images/sibarimg1.png')}"/>
<span>Availability</span>
</a>
<ul class="dropdown">
<apex:SelectCheckboxes value="{!selectedAvailability}" layout="pageDirection">
<apex:selectoption itemlabel="0% (Available)" itemvalue="0" id="opt1" onclick="changeclass()"/>
<apex:selectoption itemlabel="25%" itemvalue="75" id="opt2"/>
<apex:selectOption itemLabel="50%" itemValue="50" id="opt3"/>
<apex:selectOption itemLabel="75%" itemValue="25" id="opt4"/>
<apex:selectOption itemLabel="100% (Not Available)" itemValue="100" id="opt5"/>
</apex:SelectCheckboxes>
</ul>
<!--submenu finish-->
</li>
I want to change style of <li> based on the selection of any of the selectoption. Any ideas, how can we do that?
- Koustubh Kulkarni
- November 02, 2015
- Like
- 0
- Continue reading or reply
Bulk update record from VF page?
VF page-
<apex:page standardController="contact" extensions="cntrl_bulk_test"> <!-- controller="cntrl_bulk_test" -->
<apex:form >
<apex:pageBlock id="pgBlkSkilllevel">
<apex:pageBlockTable value="{!lsttopiclevel}" var="a">
<apex:column headerValue="Skill Group">
<apex:outputField value="{!a.Skill_Group__c}"/>
<!-- <apex:inputfield value="{!a.Skill_Group__c}"/> -->
</apex:column>
<apex:column headerValue="Topic Name">
<apex:outputField value="{!a.Topic__r.Name}"/>
</apex:column>
<apex:column headerValue="Skill Target">
<apex:outputField value="{!a.skill_level_expected__c}"/>
</apex:column>
<apex:column headerValue="Skill Level">
<apex:inputfield value="{!a.Skill_Level__c}"/>
</apex:column>
<apex:column headerValue="Year">
<apex:inputfield value="{!a.Year__c}"/>
</apex:column>
<apex:column headerValue="Quarter">
<apex:inputfield value="{!a.Quarter__c}"/>
</apex:column>
</apex:pageBlockTable>
<br/>
<apex:commandButton value="Save" action="{!saveSkillLevelRating}" reRender="pgBlkSkilllevel"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller-
public with sharing class cntrl_bulk_test
{
Public static Id EmployeeId {get;set;}
Public static List<Contact_Topic_Scale__c> lsttopiclevel{get;set;}
public cntrl_bulk_test(ApexPages.StandardController controller)
{
EmployeeId =system.currentpagereference().getparameters().get('id');
Contact coninfo = [select name from contact where id =: EmployeeId];
lsttopiclevel = new List<Contact_Topic_Scale__c>([SELECT Id, Core_Skill_Set__c,Contact_Skill_Set__c,Delta_Actual_vs_Expected__c,Employee__c,Quarter__c,Skill_Group__c,Skill_Level__c,skill_level_expected__c,Year__c,Topic__r.Name FROM Contact_Topic_Scale__c where Employee__c =: coninfo.name ORDER BY Skill_Group__c ASC ]);
}
Public PageReference saveSkillLevelRating()
{
System.debug('*******saveSkillLevelRating0*******');
PageReference pageRef = ApexPages.currentPage();
update lsttopiclevel;
return pageRef ;
}
}
Can anyone help me with this issue?
- Koustubh Kulkarni
- October 12, 2015
- Like
- 0
- Continue reading or reply
Need help to write test class?
public class my_groups
{
Set<Id> setGroupMemberId = new Set<Id>();
public cntrl_my_groups()
{
List<CollaborationGroup> lstGroup = new List<CollaborationGroup>();
Id currentUserId = UserInfo.getUserId();
List<CollaborationGroupMember> lstGroupMember = [SELECT CollaborationGroupId,MemberId FROM CollaborationGroupMember where MemberId =:currentUserId];
for(CollaborationGroupMember gm : lstGroupMember)
{
setGroupMemberId.add(gm.CollaborationGroupId);
}
}
public list<CollaborationGroup> get_my_group
{
get
{
if(setGroupMemberId.size() > 0)
get_my_group = [SELECT Id,Name FROM CollaborationGroup where Id in: setGroupMemberId];
return get_my_group;
}
set;
}
}
Any kind of help will be Appreciated.Thanks
- Koustubh Kulkarni
- October 09, 2015
- Like
- 0
- Continue reading or reply
- Mecrin Luvis 1
- October 08, 2015
- Like
- 0
- Continue reading or reply
What is Live Agent Supervisor?
Hi All,
currently i am setting up live agent in sanbox,i did not understand what is live agent supervisor? is it a user who is supervisor of that live agent?
Kindly let me know what is live agent supervisor,what he can do,what is the use of it,
Thanks,
Sudhakar.
- sudhakar.force
- October 08, 2015
- Like
- 0
- Continue reading or reply
Forgot password Link to the community(via mail) returning wrong community URL?
So what should I do to fix this issue? Any kind of help will be appreciated.Thanks.
- Koustubh Kulkarni
- September 28, 2015
- Like
- 0
- Continue reading or reply
How to implemet search functionality in site.com site?
- Koustubh Kulkarni
- September 08, 2015
- Like
- 0
- Continue reading or reply
Create multiple records of same other fields but different one field?
I am new to salesforce. I have one junction object called allocation__c which is junction between contact and project__c. Allocation has various fields. after selecting time period(1 week,2 week,1 month,2 months etc.) i want to generate multiple records with same field values but each record for only one week.i.e. if i select 1 month then there should be four records with other parameters remaining same but just change in start and end date. how can we do that??
- Koustubh Kulkarni
- August 20, 2015
- Like
- 0
- Continue reading or reply
Login to salesforce using connection.js
I'm trying to connect to salesforce from an exterior website using javascript and getting an Error.
Here is My code:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<script src="https://na6.salesforce.com/soap/ajax/30.0/connection.js" ></script>
<script type="text/javascript" >
function logincall()
{
try{
var usrname = document.getElementById('userid').value;
var passwrd = document.getElementById('passid').value;
if(usrname == null || usrname == '' || passwrd == null || passwrd == '')
{
alert('Please enter Username AND Password');
return;
}
var result = sforce.connection.login(usrname, passwrd);
alert("Logged in with session id " + result.sessionId);
}
catch(error)
{
alert(error);
}
}
</script>
</HEAD>
<BODY>
To test logging into a Salesforce Instance using the connection.js "login" call
<table>
<tr>
<td>Username</td>
<td><input type="text" id="userid" value="" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" id="passid" value="" /></td>
</tr>
</table>
<input type="button" value="Login" onclick="logincall();" />
</BODY>
</HTML>
I'm getting an Error : The requested url services/Soap/u/30.0 was not found on this server
Any idea anyone?
- Elad Kaplan 3
- August 28, 2014
- Like
- 1
- Continue reading or reply
salesforce and lotus notes integration
Hi,
Can anyone please help me regarding integration of lotus notes to salesforce.
Thanks
Vishal
- VG-ACC
- September 24, 2013
- Like
- 0
- Continue reading or reply
Site.com and Visual Force do they work together?
I am looking at site.com and while it all looks very good I am left with a simple question. Can I create visual force pages with it and import them into my site created in salesforce "propper"?
If not then what is site.com all about?
All the tutorials tell me hwo to create pages with site.com but I don't see how to integrate my salesforce "propper" sites and objects with this tool.
- kieran.osullivan
- August 24, 2012
- Like
- 0
- Continue reading or reply
Determine the Public Groups a User Is In
I am working on something where I want to allow an admin to assign items to a Public Group. Then, at runtime, I need to determine what Public Groups a user is in (directly or via Roles / Roles + Subordinates) and display the appropriate items. Because Public Groups can be complicated having other Public Groups as Members and also Roles & Subordinates, figuring out the Groups a user is in can be difficult.
I started a conversation on Twitter about it and then did some research and have a starting point. I'd like to encourage others to help me vet this and then it could become a Cookbook item down the line. Here's what I got...
I think this can be done in 2 steps without much looping. From what I can tell, the Group table can contain all kinds of Groups ("Regular" Public Groups, Roles, Soles & Subordinates, Queues, etc.). The Group Member table seems to only contain pointers to Users or to Other Groups. Groups that are copies of Roles and Roles & Subordinates have a Related Id filled in.
I believe the following 2 queries could determine the Public Groups that a User is actually in...
1) Query the Group table to get the Group records where the Related Id = the users's role. We could filter for Type of Role or RoleAndSubordinates, but it seems that anything with a RelatedId filled in is one of those types. This query is essentially getting the Group records that mirror our Role record.
List<String> roleRelatedGroupIds = new List<String>(); for (Group g : [SELECT id, RelatedId, Type FROM Group where RelatedId= :UserInfo.getUserRoleId()]{ roleRelatedGroupIds.add(g.id); }
2) Next we query the Group Member table for records where our user is specifically assigned and also include records where our role is assigned.
List<String> allGroupIDs = new List<String>(); for (GroupMember gm : [SELECT Id, group.id, group.name, group.type FROM GroupMember where (UserOrGroupId = :UserInfo.getUserId() AND group.type='Regular') OR (UserOrGroupId IN :roleRelatedGroupIds AND group.type='Regular')]{ allGroupIDs.add(gm.group.id); }
I'd need to hack at this given lots of users and lots of Group Types like Queues, Territories, Roles, Public Groups, etc. From what I've been able to test, this works.
- hemm
- March 09, 2011
- Like
- 0
- Continue reading or reply
want to login in salesforce from ouside html page and want to use ajax in html page
- learnSF
- September 08, 2008
- Like
- 0
- Continue reading or reply