• Simrin
  • SMARTIE
  • 1055 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 108
    Questions
  • 89
    Replies

Hello,

I wrote a code on button, when a user clicks on the button, the recod is shhared with employer.

User-added image
 

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var url = parent.location.href; 
var split = url.split("/");
var recordID = split[3];
var objSharing = new sforce.SObject("EFX_Evalution__share");
objSharing.ParentId = recordID;
objSharing.AccessLevel = 'Read';
objSharing.UserOrGroupId = '{!EFX_Evalution__c.EmployeeId__c}';
var result = sforce.connection.create([objSharing]);

It worked good for & month, now the testing throws a popup error which is like below,

User-added image
 
Hello,

I execute a controller function using below fucntion
$(document).keypress(function(e) {
        if(e.which == 13) {
            actionSearchPlus(); 
        }
    });

The probelm is when i enter value in input text it is not detected unless we wlcik anywhere on screen before clicking enter.
 <apex:inputText value="{!searchSkillName}" styleClass="searchInput"/>

Any suggestion to encounter this issue.
Hello,

I am using eclipse,
How can i come to know the history of modificatio by all users.
 
Hello,

I have below piece of code, which worked well for 1 month and the test class was also sucessful.
Wheni check it again it gevew, Too many sql queries error for a line.
When i execute this line in Execute query then it returns only 15 rows, i have no idea why it fails

List temp = new List();
            try{
temp = [SELECT EFX_Category__c FROM ProfileSkill where EFX_Type__c ='Certifications' ORDER BY EFX_Category__c] ;
            }Catch(DmlException de ){
                System.debug(de);
            } 

 
Hello,

I donot use eclipse, i directly code on console.

Is it possible to retrieve code of 1 month before.
trigger UsableUpdateTrigger on EFX_WorkItem__c (after insert, after update, after delete) {
for (EFX_WorkItem__c w: trigger.new) {
if(Trigger.isUpdate){
    EFX_WorkItem__c recordIdOfParent = [SELECT recordTypeid FROM EFX_WorkItem__c WHERE Parent_Item__c =:w.Parent_Item__c limit 1];
    RecordType idLevel0 = [Select Id From RecordType Where Name ='Level 0 Task' limit 1];
    RecordType idLevel1 = [Select Id From RecordType Where Name ='Level 1 Task' limit 1];
    RecordType idLevel2 = [Select Id From RecordType Where Name ='Level 2 Task' limit 1];
    RecordType idLevel3 = [Select Id From RecordType Where Name ='Level 3 Task' limit 1];
    if(recordIdOfParent!=null){
        if(recordIdOfParent.recordTypeid == idLevel3.Id){
        }else if(recordIdOfParent.recordTypeid  == idLevel2.Id){
            w.recordTypeid = idLevel3.Id;  //record is read only
        }else if(recordIdOfParent.recordTypeid  == idLevel1.Id){
            w.recordTypeid = idLevel2.Id;
        }else if(recordIdOfParent.recordTypeid  == idLevel0.Id){
            w.recordTypeid = idLevel1.Id;
        }
        update w;
    }
}
}
Hello,

My custom object has few columns,
When i try to reset recordTypeid t gives me //record is read only

I dont know the cause for this error.

I am able to update other rows with other fields.

I have trouble in updating current row with column recordTypeid 
Hi,

I have a simple SOQL query which is executed many times.

for(1000 times){
List<custom_Object_c > pList = [SELECT x__c FROM custom_Object_c ];
}

It gives me error that i execute more than required queries and gives a exception on page.

I want to find a solution where it will not give exception on page and execute the maximum times it could and retrived the maxium number of data in pList  and continue with that list, it may ignore the rest.

What can be solution.
Hello,

I have a use case to retrive few columns form a custom object.
Belwo is my use case.
I use SOQL to retrive a User.FirstName, User.LastName from ProfileSkillUser.
I want to retrive two more fields Practice__c and Team__c from UserAdditionalInformation__c which has User__c as look up.

User__c in UserAdditionalInformation__c should match User in ProfileSkillUser. 

List<ProfileSkillUser> pList = SELECT User.FirstName, User.LastName, ProfileSkill.Name,Skill_assessment__c FROM ProfileSkillUser;

ProfileSkillUser
-User-User-Lookup(User)
User
 -Name - Name - Name
-Username - Username -Text(80)
-Other User fields

UserAdditionalInformation__c
-User-User__c-Lookup(User)
-Team-Team__c-Lookup(Team)
-Practice-Practice__c-Lookup(Team Practice)


Hello,

I had error with Date format for people using in France and India.
I changed the page to be <apex:page language="en-IN"
Which solved the issue.

French format mm/dd/yyyy and Indian format dd/mm/yyyy

I am now forced to remove this parameter.

How can i detect the langiuage in controller and do the task
Hello,

I am working on salesforce platform for 6 months.
I have cleared certif DEV 401 and mainly work on development part (visualforce + apex). I have also have backgroud of JAVA.

I a taking up a new opportunity in new company, so i want to increase my skills more.

I want to be know more about salesforce, majorityly admin and also imrove my development slkills a bit.
Devlopment skills cant be increased by reading. I auusme though.

can someone tell me about Study plan i should follow. I have 1.5 month, i ccan dedicate around 2 hours per day for the studying

Hello,

I want to use property file like Java in Salesforce;
It is possible by custom field but i am not sure if this will serve my usecase.
My use case is
- I want to use all labels in a file instead of editing each label.
- I use two languages, french and english, so i want that language should be based on user selected language. It will be english or fench only.
- I want to translate in Visaulforce pages and Apex class as well.

How can i achieve this use case.

Thank you
Hello,

There are hard voded text on my visualforce page.
like
<apex:outputText value="Validity" />
I want to put "Validity" in a property file and use the property file.
I want to put all text in visualforce page, that can be modified.

How can i do it in salesfforce

 
Hello,

When i access my visualforce page, i get lops is developer console.
since two days i find it difficult to get logs.

I am opening in same session.

Any idea what i can do ?
Hello,

I have a field with type "Record Type".

How can i use it in SOQL query ?

recordType , recordTypeId didnt work

Hello,
Can i use fucntions in trigger. I have a piece of code which is executed many times. 

 

 

hello,

I have a table with few rows displayed.

I have a use case where, If user howers on Column 1 then the popup should display some text from Column 2.
<apex:pageblocktable value="{!pList}" var="item" cellpadding="1" cellspacing="1" id="tbleReference">
     <apex:column headervalue="Hower Text">
          {!item.ColumnToHower}
    </apex:column>                         
    <apex:column headervalue="More Info">
          {!item.columnWith MoreInformation}
    </apex:column>      
    <apex:column headervalue="Extra colimn">
          {!item.ExtraColumn}
    </apex:column>      
</apex:pageblocktable>
In above case , if user howers on "Hower Text" then contents of "more info" will be displayed.

I also think of another way, I will not populate the column "more info" instead of than when hower is made then i will pass the hower value in by action funtion to backend and just diaplay the contents derived from soql query.

I am looking for some things like Jquery or javascript or inbuild tags that can serve my purpose.

Thank you

 
Hello,

I want to get the value of a column before and after the update.
trigger test on Custom_Object__c (after insert, after update, before delete) {
    
    List <Custom_Object__c> item = new List <Custom_Object__c>();
    
    for (Custom_Object__c w: trigger.new) {
        String Column1 = w.Column1__c;
    }
}

In the above trigger i get the value of Column1__c after update.

I assume that doing below changes will get me value before update
trigger test on Custom_Object__c (before insert, before update, before delete) {
	
}

I want to detect values in a single trigger that what is the value befpre update and after update.
Is there any way to do it.


Hello,

How can i achieve Module operand in Visualforce.

NUMBER % 2 == 0  //even
NUMBER % 2 == 1 //odd
Hello,

I want to add sample data to a custom object.
This data will be inserted to around 300 uers and 100 data each so I want to insert 300 users * 100 rows.

For (All users){
custom__C c = custom__C();
c.user = user;
c.column1 = 'XYZ';
c.column2 = 2;
c.column3 = 'PQR';
insert c; 
}

i assume that the saleforce has limitation for number of SQl queries.

How can i achieve it ?
Hello,

I want to know method to display radio button in vertical manner
 
<apex:selectRadio value="{!choice}">
            <apex:selectOption itemLabel="a" itemValue="a"/>
            <apex:selectOption itemLabel="b" itemValue="b"/>
            <apex:selectOption itemLabel="c" itemValue="c"/>
        </apex:selectRadio>

 
Hello,

I have table displayed in below manner.

test
My usecase is, User will specify the end date.

and if this end date is passed then the text1 should be set to Text2.

I could do it in visualforce page, but I do not want to check this condition everytime a action is taken on page. Is there any visualforce capacity i could use ?
  • March 23, 2015
  • Like
  • 1

Hello,

I wrote a code on button, when a user clicks on the button, the recod is shhared with employer.

User-added image
 

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var url = parent.location.href; 
var split = url.split("/");
var recordID = split[3];
var objSharing = new sforce.SObject("EFX_Evalution__share");
objSharing.ParentId = recordID;
objSharing.AccessLevel = 'Read';
objSharing.UserOrGroupId = '{!EFX_Evalution__c.EmployeeId__c}';
var result = sforce.connection.create([objSharing]);

It worked good for & month, now the testing throws a popup error which is like below,

User-added image
 
Hello,

I have below piece of code, which worked well for 1 month and the test class was also sucessful.
Wheni check it again it gevew, Too many sql queries error for a line.
When i execute this line in Execute query then it returns only 15 rows, i have no idea why it fails

List temp = new List();
            try{
temp = [SELECT EFX_Category__c FROM ProfileSkill where EFX_Type__c ='Certifications' ORDER BY EFX_Category__c] ;
            }Catch(DmlException de ){
                System.debug(de);
            } 

 
Hi,

I have a simple SOQL query which is executed many times.

for(1000 times){
List<custom_Object_c > pList = [SELECT x__c FROM custom_Object_c ];
}

It gives me error that i execute more than required queries and gives a exception on page.

I want to find a solution where it will not give exception on page and execute the maximum times it could and retrived the maxium number of data in pList  and continue with that list, it may ignore the rest.

What can be solution.
Hello,

When i access my visualforce page, i get lops is developer console.
since two days i find it difficult to get logs.

I am opening in same session.

Any idea what i can do ?
Hello,

How can i achieve Module operand in Visualforce.

NUMBER % 2 == 0  //even
NUMBER % 2 == 1 //odd
Hello,

I want to add sample data to a custom object.
This data will be inserted to around 300 uers and 100 data each so I want to insert 300 users * 100 rows.

For (All users){
custom__C c = custom__C();
c.user = user;
c.column1 = 'XYZ';
c.column2 = 2;
c.column3 = 'PQR';
insert c; 
}

i assume that the saleforce has limitation for number of SQl queries.

How can i achieve it ?
Hello,

I am calling action Function from selectRadio but it is not getting caled.
It works perfectly if i replace selectRadio with selectList.

Why the behaviour is difference for Radio button.
<script type="text/javascript">    
	function initJSChoice(id1){ 
		initColumn(document.getElementById(id1).value);
	}
	</script> 

<apex:form id="map">
        <apex:actionFunction name="initColumn" action="{!matrix}" reRender="map,search">
            <apex:param name="param1" value="" />
        </apex:actionFunction>
	<apex:selectRadio value="{!choice}" id="contentForDisplay"  onchange="initJSChoice('{!$Component.contentForDisplay}');" >
            <apex:selectOption itemLabel="a" itemValue="a"/>
            <apex:selectOption itemLabel="b" itemValue="b"/>
            <apex:selectOption itemLabel="c" itemValue="c"/>
        </apex:selectRadio>  
</apex:form>

 

Hello,

I have a list which adds the list to another list.

In one use case, tempResult gets 1 row at a time.
searchResult will have 5 rows

 
public with sharing class Controller {

    public List<ProfileSkillUser> searchResult{get;set;}

    public Controller() {
        List<ProfileSkillUser> tempResult;
        searchResult = new List<ProfileSkillUser>();
        for(integer i=0; i<5; i++){
            tempResult = new List<ProfileSkillUser>();
            tempResult = [SELECT User.FirstName, User.LastName, ProfileSkill.Name
                              FROM ProfileSkillUser WHERE ProfileSkill.Name =:i ORDER BY UserId ];
            searchResult.addAll(tempResult);
        }
    }
}


this is doing a OR kind of operand.

I now need to make a AND kind of operand.
public List<ProfileSkillUser> searchResult{get;set;} 

function(){
public List<ProfileSkillUser> temp;
for (5 times){
	temp = [SELECT User.FirstName, User.LastName, ProfileSkill.Name, EFX_Type__C, ProfileSkill.EFX_Category__c, EFX_Skill_assessment__c
                        FROM ProfileSkillUser];

}

}


temp will populate value 5 times
searchResult should be addition/summation of temp
Hello,

I have a pageBlockTable on visualForce like below.
 
<apex:pageblock id="PB2">
                    <apex:pageblocktable value="{!pList}" var="item">
                        <apex:column headervalue="User with Skill">
                            {!item.User.FirstName}&nbsp;{!item.User.LastName}
                        </apex:column>
                        <apex:column headervalue="Skill Name">
                            {!item.ProfileSkill.Name}
                        </apex:column>                     
                    </apex:pageblocktable>
                </apex:pageblock>

User-added image
 

I will have many Users.  I am ordering it as per user name. I want to just display the first name and hid the repeated names.

Is there way to achieve my use case using CSS or javascript.

Thank you

  • April 30, 2015
  • Like
  • 0
<apex:commandButton id="search" styleClass="search" action="{!search}" image="{!URLFOR($Resource.search)}" style=" height: 50px;  width: 50px;"> </apex:commandButton>   

    public void search() {
        system.debug('###'+typeSelected+'#'+category+'#');
    }
I have two select list aboove in the page.
When i click on selectList, i can get values but when i press command button. the search fucntion  is not executed at all
 
  • April 28, 2015
  • Like
  • 0
Hello,

I have added a image as static resources.
How can i use it as command button.
  • April 27, 2015
  • Like
  • 0