-
ChatterFeed
-
11Best Answers
-
0Likes Received
-
0Likes Given
-
22Questions
-
80Replies
How to query the logged in User?
- sindhu@demo.com
- August 23, 2012
- Like
- 0
- Continue reading or reply
HI
Help me with the testclass for the trigger
trigger updateOpportunity on Preference__c (after insert)
{
if (Trigger.isAfter)
{
Map<String, String> map_pref = new Map<String, String>();
for (Preference__c oPref : Trigger.new)
{
map_pref.put(oPref.Opportunity__c, oPref.Id);
}
List<Opportunity> list_opp = new List<Opportunity>();
for (Opportunity opp : [Select Id, Preference__c,
Preference_Associated__c
From
Opportunity
Where
Id IN : map_pref.keySet()])
{
opp.Preference__c = map_pref.get(opp.Id);
opp.Preference_Associated__c = true;
list_opp.add(opp);
}
if (list_opp.size() > 0) update list_opp;
}
}
- bharath kuamar
- July 13, 2012
- Like
- 0
- Continue reading or reply
display the duplicate values present in a list.
Hi All.
I have a list called allCertNo which is a list obtained from a csv. The list contains some tandom ten digit numbers called certnumbers. I want to check for duplicate certnumbers in this list and display the duplicate ones. checkDuplicates is a set.
List<String> temp = new List<String>();
Set<String> checkDuplicates = new Set<String>();
for (String s : allCertNo ){
boolean checkVal = checkDuplicates.add(s);
System.debug('checkVal is>>'+checkVal );
if(!checkVal) {
temp.add(s);
numStatus = false;
countErrors++;
System.debug('Duplicate error');
}
}
System.debug('Temp list>>' + temp); // this keeps giving an empty list
Even though my list allCertNo has duplicate values, checkVal never turns false.
What could I possibly be missing out on?
Please help.
Much thanks.
Ruchika
- Ruchika
- May 15, 2012
- Like
- 0
- Continue reading or reply
Help with Setter and Getter Method
Hi,
I am trying to return the number of records associated with the user input. Here is my VF markup:
<apex:page standardController="SFDC_Employee__c" extensions="myTextController" > <apex:form > <apex:pageblock > <apex:pageblockSection > <apex:inputText id="myText" value="{!myText}" label="Employee Name"> <!---<apex:actionSupport event="onclick" reRender="display"/>---> </apex:inputText><br/> <apex:commandButton value="Display" reRender="display"/><br/><br/> <apex:outputPanel id="display"> <apex:outputText value="You entered: {!ListSize}" style="font-weight:bold"/><br/><br/> </apex:outputpanel> </apex:pageblockSection> </apex:pageblock> </apex:form> </apex:page>
And here is my Apex class:
public class myTextController { public myTextController(ApexPages.StandardController controller) { } public String myText {get; set;} List<Schedule_Days_Off__c>sdolist=[SELECT Name FROM Schedule_Days_Off__c WHERE Employee_Name__r.Name =: myText]; Integer x = sdolist.size(); public Integer getListSize(){ return x; } }
The List returns values when I specific a certain name. For instance, if I change the SOQL statement to SELECT NAME FROM SCHEDULE_DAYS_OFF__C WHERE EMPLOYEE_NAME__R.NAME = 'TEST USER.' The List size is not 0. But when I do EMPLOYEE_NAME__R.NAME =: myText, and enter Test User on the VF page. The List size is 0. I think it may be my setter method, but I am not sure. Please help. Thank you.
- lovetolearn
- April 22, 2012
- Like
- 0
- Continue reading or reply
test case help
this is my controller and test case i have marked the parts that are not covered in red please help cover them
controller
public class WoW_ManageListController
{
public List<FulfillWrapper> wrappers {get; set;}
public static Integer toDelIdent {get; set;}
public static Integer addCount {get; set;}
private Integer nextIdent=0;
public Invoice__c INC {get;set;}
public Decimal INVLICOUNT{get;set;}
public WoW_ManageListController ()
{
INC = [select id,Dev_Line_Item_Count__c from Invoice__c where id=:Apexpages.currentpage().getparameters().get('id')];
INVLICOUNT = INC.Dev_Line_Item_Count__c ;
system.debug('**********'+INC.id);
wrappers=new List<FulfillWrapper>();
for (Integer idx=0; idx<INVLICOUNT ; idx++)
{
wrappers.add(new FulfillWrapper(nextIdent++));
}
}
public void delWrapper()
{
Integer toDelPos=-1;
for (Integer idx=0; idx<wrappers.size(); idx++)
{
if (wrappers[idx].ident==toDelIdent)
{
toDelPos=idx;
}
}
if (-1!=toDelPos)
{
wrappers.remove(toDelPos);
}
}
public void addRows()
{
for (Integer idx=0; idx<addCount; idx++)
{
wrappers.add(new FulfillWrapper(nextIdent++));
}
}
public PageReference save()
{
List<Fulfillement__c> accs=new List<Fulfillement__c>();
for (FulfillWrapper wrap : wrappers)
{
accs.add(wrap.acc);
}
try
{
insert accs;
}
catch(dmlexception e)
{
// ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Oops An Error Occured!'));
return null;
}
// return new PageReference('/' + Schema.getGlobalDescribe().get('Invoice__c').getDescribe().getKeyPrefix() + '/o');
return new PageReference('/' + INC.id);
}
public class FulfillWrapper
{
public Fulfillement__c acc {get; private set;}
public Integer ident {get; private set;}
public list<Invoice_line_item__c> INVLI {get;set;}
public integer countinvli {get;set;}
public Invoice__c INC {get;set;}
public FulfillWrapper(Integer inIdent)
{
INC = [select id,Dev_Line_Item_Count__c from Invoice__c where id=:Apexpages.currentpage().getparameters().get('id')];
INVLI = [select id,item__c,Item__r.Type__c,quantity__c,Invoice_Number__c,Qty_fulfilled__c,warehouse__c from invoice_line_item__c where Invoice_Number__c=:INC.id AND Dev_Qty_to_be_Fulfilled__c >0 ];
countinvli = INVLI.size();
ident=inIdent;
acc=new Fulfillement__c(Item__c = INVLI[ident].item__c,Invoice_Line_Item__c=INVLI[ident].id,Invoice__c=INVLI[ident].Invoice_Number__c,qty_out__c = (INVLI[ident].Quantity__c-INVLI[ident].Qty_fulfilled__c),warehouse__c=INVLI[ident].warehouse__c,date__c=system.today());
}
}
}
test cAse
@isTest private class WoW_ManageListController_TC { static testMethod void ManageListController() { Invoice_Category__c ic=new Invoice_Category__c(); ic.name='sdsd'; ic.Active__c=true; insert ic; account a = new account(); a.name='sdds'; insert a; branch__c b = new branch__c(); b.name='sdsd'; b.Dev_Invoice_Auto_Number__c=67; insert b; Invoice__c in1=new Invoice__c(); in1.Invoice_Category__c=ic.id; //in.doctor__c= in1.Sales_Branch__c=b.id; in1.KPI_Branch__c=b.id; in1.name='sdfd'; in1.Patient__c=a.id; insert in1; Integer toDelIdent=0; ApexPages.currentPage().getParameters().put('id', in1.id); WoW_ManageListController cs = new WoW_ManageListController(); cs.delWrapper(); cs.addRows(); cs.save(); } }
- amateur1
- April 11, 2012
- Like
- 0
- Continue reading or reply
Issue of "List index out of bounds: 0".
Hi,
I am trying to insert test data as shown below:
CODE:
----------
List <PriceBook2> pb2list = new List<PriceBook2>();
List <Product2> prodlist = new List<Product2>();
List <PriceBookEntry> pbelist = new List<PriceBookEntry>();
List <PriceBookEntry> stdPbelist = new List<PriceBookEntry>();
//get standard pricebook
List<Pricebook2> standardPbList = [select id, name, isActive from Pricebook2 where IsStandard = true limit 1];
for (Integer j = 0; j<quantity; j++){
pb2list.add(new PriceBook2(Name = 'Test Price Book' +j, isActive = true));
}
insert pb2list;
for (Integer j = 0; j < quantity; j++) {
prodlist.add(new Product2(Name = 'Test Product' +j, productCode = 'ABC', isActive = true));
}
insert prodlist;
//before you create custom pricebooks, create standard ones
for (Integer j = 0; j < quantity; j++) {
stdPbelist.add(new PriceBookEntry(Pricebook2Id=standardPbList[0].id, Product2Id=prodlist.get(j).id, UnitPrice=99, isActive=true, UseStandardPrice=false));
}
insert stdPbelist;
for (Integer j = 0; j < quantity; j++) {
pbelist.add(new PriceBookEntry(Pricebook2Id=pb2list.get(j).id, Product2Id=prodlist.get(j).id, UnitPrice=99, isActive=true, UseStandardPrice=false));
}
insert pbelist;
return pbelist;
I am getting the issue of "List index out of bounds: 0" nearthe below peice of code:
" stdPbelist.add(new PriceBookEntry(Pricebook2Id=standardPbList[0].id, Product2Id=prodlist.get(j).id, UnitPrice=99, isActive=true, UseStandardPrice=false));"
. Please help me on this.
Thanks,
JBabu.
- JBabu
- April 10, 2012
- Like
- 0
- Continue reading or reply
Handling Product list price changes in Opportunity Line Items
I am working on a trigger for the PricebookEntry standard object, but get the following error when I try to deploy it to my company sandbox:
'SObject type does not allow triggers: PricebookEntry'
Can anyone confirm that PricebookEntry does not allow triggers and/or have any idea why it wouldn't?
- jsymonds
- April 10, 2012
- Like
- 0
- Continue reading or reply
The CSS is not useful in my salesforce system, pls come in and give me an idea
The part of codes are my visualforce page code:
<apex:page controller="client_Controller" tabStyle="account">
<style>
.errorMessage{ color: red; font-weight: strong;}
</style>
<apex:messages styleClass="errorMessage"/> //this code is for display the error messages,and i
wanna make the font color red
</apex:page>
the result is the font color is still black,why?can you tell me how??
- zjlg
- April 10, 2012
- Like
- 0
- Continue reading or reply
How to: Input Date field on Visualforce page with custom controller
Hey guys,
I know that currently in visualforce, as a workaround we can use an input date field by binding it to a date field from an unused object instance.
Currently I have a visualforce page with a custom controller.
<apex:page controller="FundingReportController" sidebar="false" showheader="false" standardstylesheets="true">
I want to display two date fields here which show the date picker. I want to be able to be able to use the date fields from a custom object called money transactions.
<apex:form> <table id="searchTable" cellpadding="2" cellspacing="2"> <tr> <td style="font-weight:bold;">From Date:<br/> <apex:inputField value="{!mt.closeDate}"/>
I am getting this error.
Error: Unknown property 'FundingReportController.mt' |
How do I declare the Money transactions object mt in this case since the contoller is a custom one and is required. Any other way I can declare the custom object I need so I can reference the fields I need in this form?
- calvin_nr
- April 09, 2012
- Like
- 0
- Continue reading or reply
Auto Create Record
Hi all,
I have written a Trigger in Opportunity it fires when an opportunity is created automatically a record will be created in another object
Here i want multiple records to be created for one Opportunity
Objects :
Opportunity and
Record
Trigger:
trigger AutoCreateRecord on Opportunity (after insert){ List<Record__c> Records = new List<Record__c>(); for (Opportunity newOpportunity: Trigger.New){ if(newOpportunity.CloseDate!=null && newOpportunity.StageName=='Closed Won'){ Records.add(new Record__c( Name ='1', Opportunity__c = newOpportunity.Id, Amount__c = 12)); } } insert Records; }
- affu
- April 09, 2012
- Like
- 0
- Continue reading or reply
Informatica Power Center Integration with Salesforce.com
Can somebody help me to understand the follwoing points ?
1) how to insert data in salesforce with Informatica Power center ?
2) How to integrate the informatica with the Salesforce .? any API or Adpater for webserivces
3) Can we automate the process ?
Please provide the link of Blog, article or Tech doc ..thanks a lot :)
- SFDC_Evolve
- November 04, 2012
- Like
- 0
- Continue reading or reply
Informatica Power Center Integration with Salesforce
Can somebody help me to understand the follwoing points ?
1) how to insert data in salesforce with Informatica Power center ?
2) How to integrate the informatica with the Salesforce .? any API or Adpater for webserivces
3) Can we automate the process ?
Please provide the link of Blog, article or Tech doc ..thanks a lot :)
- SFDC_Evolve
- November 04, 2012
- Like
- 0
- Continue reading or reply
Informatica Power Center Integration with Salesforce
Can somebody help me to understand the follwoing points ?
1) how to insert data in salesforce with Informatica Power center ?
2) How to integrate the informatica with the Salesforce .? any API or Adpater for webserivces
3) Can we automate the process ?
- SFDC_Evolve
- November 04, 2012
- Like
- 0
- Continue reading or reply
Has anyone have tutorials for informatica Powercenter ?
I need to migrate the Siebel database to Salesforce.com Please share documents related to this :)
- SFDC_Evolve
- November 01, 2012
- Like
- 0
- Continue reading or reply
Need Code to Generate 10 digit random number
Double N = math.random()*1000000000;
Long l = integer.valueof(N)*100;
string SNumber = string.valueof(l);
I have to insert that in a Text (External Id) fields.
Thanks
- SFDC_Evolve
- October 31, 2012
- Like
- 0
- Continue reading or reply
.add function of List .. change the order
lst = usr.Product_Id_s__c.split(',');
system.debug('Print the value of lst'+lst); // In this I got the Order B D A C
for(String s : lst){
system.debug('Print the value of S' + s);
flst.add(s);
}
system.debug('Print the value of the flst'+flst); // the Order got changed in the final Lst . . .
Please help me in this . I have to retain the order in the list . . .
- SFDC_Evolve
- August 06, 2012
- Like
- 0
- Continue reading or reply
- SFDC_Evolve
- August 06, 2012
- Like
- 0
- Continue reading or reply
Formula Field return Null in Query .. But Showing value on the page .
I do have a formual field on contact . . It showing the right value on the page .. but .,i query it from contact ... it shows the null value when i query the Same field.. from contact
PLease help me on this
- SFDC_Evolve
- August 02, 2012
- Like
- 0
- Continue reading or reply
Read Word Document in the APEX
Hi
Actually .. I have upload the word document in the Salesforce .. . And read the Content and then convert it into the PDF.
Thanks
SFDC_Evolve
- SFDC_Evolve
- July 18, 2012
- Like
- 0
- Continue reading or reply
Account & Task
How find all the account which are having Task related to them... .
Query must be formed on the Account Object . . :)
Please help :)
- SFDC_Evolve
- June 28, 2012
- Like
- 0
- Continue reading or reply
Case Tab
I have few profile . For some of the Profile Case Tab is coming up in Tab Setting . . But for some of them . Case is not there
Please help on this :)
- SFDC_Evolve
- May 31, 2012
- Like
- 0
- Continue reading or reply
Tab Setting
why I am not getting all the tab setting in my profile.xml . Even though Tab are not hidden . .
and below is the code in Package.xml
<types>
<members>*</members>
<name>CustomTab</name>
</types>
Thanks
- SFDC_Evolve
- May 31, 2012
- Like
- 0
- Continue reading or reply
Tab Setting
why some of the Tab Setting are not coming in the Profile.xml . Even though these tab are not hidden ..
- SFDC_Evolve
- May 31, 2012
- Like
- 0
- Continue reading or reply
Issue with the Profile
In our org , I have installed the managed package . When I took the Instance of Our Org , and I went to check the XM of the profile .. These managed package object are not coming in the profile XMl....
Please throw some light on this . :)
Thanks
SFDC_Evolve
- SFDC_Evolve
- May 29, 2012
- Like
- 0
- Continue reading or reply
First Step in report Creation .. :)
I was preparing for Dev 401 . I got this Questiion . . :-
Select report name
Select object on which report needs to be generated
Select type of report
Select columns to be displayed
- SFDC_Evolve
- May 17, 2012
- Like
- 0
- Continue reading or reply
Email Alert !! (Urgent)
Suppose there are two objects.. A and B..... Object B have a lookup of the Object the A.....
I have requirement in which .. If a certain records of B match a condtion . then I need to send a E-mail to the Owner of the
related records of the Object A.
I tried to write a wokflow but i could not find the fields of the Object A ...... Please suggest . how can i Complete the requirement
Thanks in advance . .
SFDC_Evolve
- SFDC_Evolve
- May 09, 2012
- Like
- 0
- Continue reading or reply
Email Template
I have an email template . I need to know . where it is being used . . and Which Users are using this template . ??
Thanks
SFDC_Evolve
- SFDC_Evolve
- April 25, 2012
- Like
- 0
- Continue reading or reply
Is It possible to get the Field Id thorugh Apex in salesforce. ?
Is It possible to get the Field Id thorugh Apex in salesforce. ?
- SFDC_Evolve
- April 20, 2012
- Like
- 0
- Continue reading or reply
Test class Weird Behavior
I have a class like
Class Xyz {
public string password {get;set;}
public String confPassword {get;set;}
public PageReference submit() {
if(password ==null || password ==''){
ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR,Label.site.password);
ApexPages.addMessage(msg);
return null;
}
if(confPassword == null || password ==''){
ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR,Label.site.confirm_password);
ApexPages.addMessage(msg);
return null;
}
//Return error if passwords do not match.
if(password != confPassword){
ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR,Label.site.passwords_dont_match);
ApexPages.addMessage(msg);
return null;
}
}
Now When I try to Write a Test class For it .. .I wrote it like below :_
system.Test.startTest();
// Create Instance of the class . .
XYZ testNewUser9 = new XYZ();
// Create Instance of the class . .
xyz testNewUser1 = new Xyz();
testNewUser1.password = 'hedhj'; // Line ABC
PageReference submitPage1 = testNewUser1.submit();
testNewUser1.password = ''; /// Line pqr
PageReference submitPage1a = testNewUser1.submit();
testNewUser1.password = 'Pass';
testNewUser9.confPassword = 'differ';
PageReference submitPage1b = testNewUser1.submit();
testNewUser1.password = 'Pass';
testNewUser9.confPassword = 'Pass';
PageReference submitPage1c = testNewUser1.submit();
system.Test.StopTest();
But the issue is that It always works for Line ABC.... and took Confirn password NUll .. if I put Line PQR above.. It works as Password.......... Ideally It should go to the every if block .
Please let me know if i am doing something wrong Thanks :)
- SFDC_Evolve
- April 20, 2012
- Like
- 0
- Continue reading or reply
Has anyone have tutorials for informatica Powercenter ?
I need to migrate the Siebel database to Salesforce.com Please share documents related to this :)
- SFDC_Evolve
- November 01, 2012
- Like
- 0
- Continue reading or reply
Best way to show an information/warning message
Hi,
******************************************************************************
Background:
Every product have a default carrier(look up) and a list of authorized carrier(list).
My salesman will be able to choose a carrier for the Opportunity Product even if the carrier isn't in the product authorized carrier by a lookup.
******************************************************************************
In that case i want to show a message to the salesman as "for the some product you didn't choose authorized carriers, please make sure to check the delivery costs with de logistics".
I know that i can check my criteria with a Trigger or using Workflow rules/and/ CheckBox.
But my question is about the best way to show up this message. i made a research but i didn't really understand.
-also-
I wanted to know if it's possible to generate a pop-up when my user is going to work on an Opportunity X.
My idea is, to show every product + carrier for the product everytimes when the user go to see this opportunity except if my salesman check "i understood - or - don't show me this message again."
Thanks dear developers
- AntonyasLen
- September 11, 2012
- Like
- 0
- Continue reading or reply
HOw to Convert Email Template to XML file
HI,
Hi have a requirement lilke Convertinh EMail Template Into XMl File , how to do it, Can any one send the sample Code
Thanks
- viswada
- September 11, 2012
- Like
- 0
- Continue reading or reply
Error while sending private chatter Messages from apex
Hi All
I want to send Private chatter message from apex .For that I follwed the code Like below
ChatterMessage cm =new ChatterMessage();
cm.body='HI This RoYal Gents Show room';
cm.ConversationId='00590000001EM7D';
cm.SenderId='00590000000bO0Y';
cm.SentDate=system.now();
insert cm;
I am getting errors like chatterMessage .body is not writable, chattermessage.consversationis is not writable.......
and like this error for every field, and can't perform DML Operations on ChatterMessages
plz any one help me
- viswada
- September 11, 2012
- Like
- 0
- Continue reading or reply
To write Query as in string format
Hai ,
I need some help related to write Query as in string format using IN operator.
global class autoCompleteController1
{
@RemoteAction
global static SObject[] findSObjects(string obj, string qry, string addFields,string profilename)
{
/* More than one field can be passed in the addFields parameter
Split it into an array for later use */
List<String> fieldList=new List<String>();
if (addFields != '')
fieldList = addFields.split(',');
// list<o2bc__Item__c> oItem=new list<o2bc__Item__c>();
set<id> setId=new set<id>(); // Here i taken the ID's into set,and writing 'IN' operator in Query
for(o2bc__Item__c oitem:[select id from o2bc__Item__c where o2bc__Type__c=:'FreePhones'])
{
setId.add(oitem.id);
}
system.debug('@@@@@@@'+setId);
/* Check whether the object passed is valid */
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
Schema.SObjectType sot = gd.get(obj);
if (sot == null)
{
return null;
}
/* Creating the filter text */
String filter = ' like \'' + String.escapeSingleQuotes(qry) + '%\'';
/* Begin building the dynamic soql query */
String soql = 'SELECT Name';
/* If any additional field was passed, adding it to the soql */
if (fieldList.size()>0)
{
for (String s : fieldList)
{
soql += ', ' + s;
}
}
/* Adding the object and filter by name to the soql */
soql += ' from ' + obj + ' where name' + filter;
string pl='new';
if(profilename!='')
{
//profile name and the System Administrator are allowed
soql += ' and Profile.Name like \'%' + String.escapeSingleQuotes(profilename) + '%\'';
system.debug('Profile:'+profilename+' and SOQL:'+soql);
}
soql += ' and o2bc__Item__c IN (\''+setid+'\')' ; // here i used IN operator,I think it is wrong,can any one tell me how to
write IN operator in query of string format..I want to retrive all the values w
with the Id's in the set.now i am not retriving the values.
soql += 'and o2bc__Status__c=\''+Pl+'\' ';
/* Adding the filter for additional fields to the soql */
/* if (fieldList != null)
{
for (String s : fieldList)
{
soql += ' or ' + s + filter;
}
} */
soql += ' order by Name limit 20';
system.debug('Qry: '+soql);
List<sObject> L = new List<sObject>();
try
{
L = Database.query(soql);
}
catch (QueryException e)
{
system.debug('Query Exception:'+e.getMessage());
return null;
}
return L;
}
}
- sunny@99-chg
- September 10, 2012
- Like
- 0
- Continue reading or reply
Send private chatter message from A[ex
HI all,
I wnat to send private chatter meassge from apex code , pla any one provide sample apex code to send private chatter Messages.
- viswada
- September 10, 2012
- Like
- 0
- Continue reading or reply
I want to set start and end date of schedule job
I want to set start and end date of schedule job using apex code.
Cron Trigger has StartTime,EndTime fields but they are not writable.
How to set start and end date.
Any idea???
Thanks
Anil
- Anil Meghnathi
- September 10, 2012
- Like
- 0
- Continue reading or reply
How to generate a notification email ...
How to generate a notification email to the task assigner if the activity is completed by the assignee (p.s. assigner <> assignee) ...
- Keith Chan
- August 23, 2012
- Like
- 0
- Continue reading or reply
How to query the logged in User?
- sindhu@demo.com
- August 23, 2012
- Like
- 0
- Continue reading or reply
.add function of List .. change the order
lst = usr.Product_Id_s__c.split(',');
system.debug('Print the value of lst'+lst); // In this I got the Order B D A C
for(String s : lst){
system.debug('Print the value of S' + s);
flst.add(s);
}
system.debug('Print the value of the flst'+flst); // the Order got changed in the final Lst . . .
Please help me in this . I have to retain the order in the list . . .
- SFDC_Evolve
- August 06, 2012
- Like
- 0
- Continue reading or reply
How to use jquery in siteforce.com
Hi,
I am newly entered siteforce.com. i want jqurey path add to my siteforce template how to add jquery path in my template please replay me
thank you.
- gopikrishna
- July 20, 2012
- Like
- 0
- Continue reading or reply
how to give the FLS to administrator
I want to give the field level Security to the administrator
- SIVASASNKAR
- July 14, 2012
- Like
- 0
- Continue reading or reply
Custom component implementation
Hi all,
How to create custom component with implement to standard page. That mean Now we can use custom coponent to custom visualforce page only. But i want to create custom component which is implement to standard page. when ever i install to this it will work on standard page (eg. Account standard page). If there any possible to achieve this.
Thanks in advance
- Rajiii
- July 14, 2012
- Like
- 0
- Continue reading or reply
HI
Help me with the testclass for the trigger
trigger updateOpportunity on Preference__c (after insert)
{
if (Trigger.isAfter)
{
Map<String, String> map_pref = new Map<String, String>();
for (Preference__c oPref : Trigger.new)
{
map_pref.put(oPref.Opportunity__c, oPref.Id);
}
List<Opportunity> list_opp = new List<Opportunity>();
for (Opportunity opp : [Select Id, Preference__c,
Preference_Associated__c
From
Opportunity
Where
Id IN : map_pref.keySet()])
{
opp.Preference__c = map_pref.get(opp.Id);
opp.Preference_Associated__c = true;
list_opp.add(opp);
}
if (list_opp.size() > 0) update list_opp;
}
}
- bharath kuamar
- July 13, 2012
- Like
- 0
- Continue reading or reply
Aggregate function
hi,
Using count function ,how can i get values of count() or count(fieldname)...
- ShravanKumarBagam
- July 10, 2012
- Like
- 0
- Continue reading or reply
how do we can sending one email every day at 10.30 am to our superior?
hi all,
now i am sending one email every day at 10.30 am to our superior by using schdule apex kindely give me reply
- viswsanath
- July 04, 2012
- Like
- 0
- Continue reading or reply
Help On Triggers
hi..
i wrote trigger on contract object.and it have some fields like start date,end date..and the contract period is 1year.but my need is before 60days of end date email will sent to the user..
i write the trigger..and i add the function today() the email is came..but how to add the 60days before of end date??
can anyone suggest me please??
Thanks&Regards
Bhagi.n
- bhagi
- July 02, 2012
- Like
- 0
- Continue reading or reply
Hi
- sessu
- June 26, 2012
- Like
- 0
- Continue reading or reply
jQuery Table Sorter not working with VF after few sorting
Hi all,
I am using jQuery Table Sorter with Apex to display set of 200 records in VF page.
My code resembles like the code described in the blog:
http://salesforcegirl.blogspot.com/2011/03/jquery-table-sorter-meets-salesforce.html
Everything is working as expected when I sort the data few times (2-3).
But if I test sorting more than few times (say 7-8 times), some of the data is lost. Is it something to do with table repeat?
Is there any limitation while using table repeat?
How ever the sorting is working no matter how many times I try to sort. Bur after some number of times sorting, some of the data is lost in VF page.
<script language="javascript" type="text/javascript"> $(document).ready(function(){ $("table").tablesorter({ headers: { 0: {sorter: 'text'}, 1: {sorter: 'text'}, 2: {sorter: 'text'}, 3: {sorter: 'text'}, 4: {sorter: 'text'}, 5: {sorter: 'text'} } }); </script> <table id="theTable" class="list tablesorter" cellspacing="1"> <thead class="rich-table-thead"> <tr class="headerRow"> <th colspan="1" scope="col">Level Of Interest</th> <th colspan="1" scope="col">Re-Confirmed</th> <th colspan="1" scope="col">Name</th> <th colspan="1" scope="col">Type</th> <th colspan="1" scope="col">Symbol</th> <th colspan="1" scope="col">Group</th> </tr> </thead> <tbody> <apex:repeat value="{!Interest}" var="fi" id="subRepator"> <tr class="dataRow {!fi.Type_Trimmed}"> <td> <apex:selectList id="slIntrest" value="{!fi.Level_Of_Interest}" size="1"> <apex:selectOptions value="{!IntLevelOptions}"/> </apex:selectList> <apex:outputLabel value="{!fi.Level_Of_Interest}" style="visibility:hidden;" /> </td> <td> <apex:inputCheckbox value="{!fi.Confirmed}" rendered="{!fi.ReConfirmedCheckBoxRendered }"/></td> <td><apex:outputLink value="/{!fi.InterestId}" title="{!fi.Name}" target="_blank">{!fi.Name}</apex:outputLink></td> <td><apex:outputLabel value="{!fi.Type}"/></td> <td><apex:outputLabel value="{!fi.Symbol}" /></td> <td><apex:outputLabel value="{!fi.Group}" /></td> </tr> </apex:repeat> </tbody> </table>
Please let help!
Thanks in advance
- VKrish
- April 17, 2012
- Like
- 0
- Continue reading or reply