• Koustubh Kulkarni
  • NEWBIE
  • 70 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 34
    Replies
Hi i am new to salesforce. I want to change styleclass of the html span element based on whether or not the <Apex:selectoption> is selected or not.Here is the piece code :-
 <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? 
Hi I am new to salesforce.I have one inline VF page on contacts layout. I have written following code to bulk update various records on a custom object, but it is not working properly.
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?
 
Hi I am new to salesforce. i need help for writting a test class for the following controller.Can anyone help me with it.
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
Hi guys,

Types of the controller!!!! and their functionality!!!

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.

I am new to salesforce. I have a community for my users in sandbox.Community is in the preview mode.The login to the community site is working just fine, i can login to the community with the test user's credentials.The problem is when a user forgets their password and tries to reset it. It sends an email to the user with the template assigned to the Forgot Password community setting. The email template includes the {!Community_URL} merge field. Ideally the email received contains a link to the page with some type of reset token as a parameter(your_community_domain/communitiy_name/login?c=TOKEN),and it should be redirected to the change password page. But When the user clicks on the above link, it gets redirected to the link (your_community_domain/communitiy_name/secur/forgotpassword.jsp?r=some token) which redirects to login page and thus there is no way for them to reset their password. Interesting thing is as community is in preview mode ideally it should not be sending any forgot password mails, but in this case it is sending mail with wrong url.

So what should I do to fix this issue? Any kind of help will be appreciated.Thanks.
Hi, i am new to salesforce. I have created site.com site. I want to implement search functionality which will search a keyword in the site content and gives back the result.so, how can we do that?
Hello,
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??
Does anybody has a working example that uses the connection.login.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?

Hi,

 

Can anyone please help me regarding integration of lotus notes to salesforce.

 

Thanks

Vishal

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.

 

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.

Hi,
 
I want to login from html page to slaeforce using ajax toolkit?
 
Can some one point right direction for this?
 
which url I have to give or which method will helpful for that?
 
How to get session id? and pass to request?
 
Can I call with httpsXmlReuest?