-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
19Questions
-
33Replies
how to display values dynamically to picklist
<apex:form >
<apex:pageBlock title="Get Accnames" >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputPanel >AccNames:</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:selectList multiselect="FAlse" size="1"></apex:selectList>
<apex:selectOptions value="{!AccNames}"></apex:selectOptions>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
public with sharing class Boss {
public String AccNames { get; set; }
List<SelectOption>Options=new List<SelectOption>();
public List<SelectOption>getAccNames(){
for(Account Acc:[select id,name From Account])
Options.add(new selectOption(Acc.name,Acc.name));
return Options;
}
}
The Account name values dosent get that pick list plase share me with answer.
Thank for advance!!
- suresh143
- June 25, 2014
- Like
- 0
- Continue reading or reply
based on field validate and calculated points
I have one object like trasactions tehre is two fields like one purchase date ,points expiry, and the customer do transaction on purchase 3000 rs get 60 points then from transaction date to after one month the points expiry message to appear in points expiry field please how to achive this
please give the
- suresh143
- March 09, 2014
- Like
- 0
- Continue reading or reply
- suresh143
- March 04, 2014
- Like
- 0
- Continue reading or reply
temparary table creation
- suresh143
- December 27, 2013
- Like
- 0
- Continue reading or reply
temprary table creation
- suresh143
- December 27, 2013
- Like
- 0
- Continue reading or reply
tempary table creation tehrough vf pag
- suresh143
- December 26, 2013
- Like
- 0
- Continue reading or reply
I need Trigger Example
Once i have created record in account object and automatically created releted list contact record created how to achive this
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
need trigger for this req
Once i have created record in account object and automatically created releted list contact record created how to achive this
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
need trigger for requriement
Ihave an account object there is one field no of opportunitys.once i had created new record with account and no of opportunitys count displayed in Account object field like no of opportunitys in detail page
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Need test class for this one
trigger trgopp2 on Opportunity (before insert,before update) {
for(Opportunity opp:trigger.new){ if(opp.Name != null){ user usr=[select id,name from user where id =: opp.ownerid]; opp.Owner_field__c=usr.name; } } }
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Trigger
iam an one req once i have created opportunity the number of opps releted accounts count displayed in account object and account having field Number of opportunities write trigger asking pls given that one
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Trigger: update child object field with parent's value (it updates via formula)
Hi swetha so you great i think so and one more is there
write trigger account and opp then once created opp how many number of opp is displyed in account object in number of opps field in acc object
- suresh143
- December 13, 2013
- Like
- 0
- Continue reading or reply
Need to test class for this one
trigger ValidateAmountValueAndTotalamount on Opportunity ( before insert, before update ) {
for ( Opportunity opp : Trigger.new )
{
if(opp.name!=null)
{
user usr=[select id,name from user where id =: opp.ownerid];
opp.Owner_field__c=usr.name;
String CSDRid= [Select Id from RecordType where RecordType.Name='Sales Opportunity-CSD'].Id;
if(opp.Stagename == 'New Opportunity' && opp.Probability == 10 && opp.RecordTypeId==CSDRid)
{
if(opp.Amount == null)
{
opp.Amount.addError('****enter something yar****');
}
if ( opp.Total_Amount__c == null )
{
opp.Total_Amount__c.addError( 'Please enter a value Total Amount.' );
}
}
- suresh143
- December 12, 2013
- Like
- 0
- Continue reading or reply
hi .The creator(Owner of the opportunity) will get copied to Initial Owner field.
.The creator(Owner of the opportunity) will get copied to Initial Owner field. for trigger pls give that code
- suresh143
- December 11, 2013
- Like
- 0
- Continue reading or reply
The BU information got populated on Opportunty. bu profile
Create an Opportunity.
2. Select an Account which have Restricted Account Sharing = TRUE.
3. Enter any other mandetory information in Opportunity.
4. Click on Save to save the Opportunity
test script
The BU information got populated on Opportunty. bu profile
. Opportunity's Legally Restricted value was set to True.
3 Opportunity was not shaerd.
- suresh143
- December 11, 2013
- Like
- 0
- Continue reading or reply
Click download button on account object the data will down load excet format in detail page data
Hi Account object is there one button is creted called download click that button account detail page data converted into excel format pls give that code And kindely share that one
- suresh143
- December 10, 2013
- Like
- 0
- Continue reading or reply
How to add record types in object
Pls record type creation and add page layouts pls see the information
- suresh143
- December 10, 2013
- Like
- 0
- Continue reading or reply
Pls Give that code
Set the Stage = “New Opportunity” , Probablity = “10%” 3. Do NOT put values in OEM or Total fields.
test script:
Please enter "OEM" field!
2. Please enter "Total Value" field!
- suresh143
- December 09, 2013
- Like
- 0
- Continue reading or reply
How to get the current page data in pdf format once click download button in object
How to get the current page date in pdf format once click download button in object
Kindely Share that Code fully pls
- suresh143
- December 02, 2013
- Like
- 0
- Continue reading or reply
how to display values dynamically to picklist
<apex:form >
<apex:pageBlock title="Get Accnames" >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputPanel >AccNames:</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:selectList multiselect="FAlse" size="1"></apex:selectList>
<apex:selectOptions value="{!AccNames}"></apex:selectOptions>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
public with sharing class Boss {
public String AccNames { get; set; }
List<SelectOption>Options=new List<SelectOption>();
public List<SelectOption>getAccNames(){
for(Account Acc:[select id,name From Account])
Options.add(new selectOption(Acc.name,Acc.name));
return Options;
}
}
The Account name values dosent get that pick list plase share me with answer.
Thank for advance!!
- suresh143
- June 25, 2014
- Like
- 0
- Continue reading or reply
based on field validate and calculated points
I have one object like trasactions tehre is two fields like one purchase date ,points expiry, and the customer do transaction on purchase 3000 rs get 60 points then from transaction date to after one month the points expiry message to appear in points expiry field please how to achive this
please give the
- suresh143
- March 09, 2014
- Like
- 0
- Continue reading or reply
test class for trigger to prevent duplication of records
hello :) i searched this code to prevent duplication of records in an object.
trigger PreventFuelDuplication on Fuel__c (before insert, before update) {
Map<String, Fuel__c> leadMap = new Map<String, Fuel__c>();
for (Fuel__c lead : System.Trigger.new) {
if ((lead.Name != null) && (System.Trigger.isInsert || (lead.Name != System.Trigger.oldMap.get(lead.Id).Name))) {
if (leadMap.containsKey(lead.Name)) {
lead.Name.addError('This Fuel already exists.');
} else {
leadMap.put(lead.Name, lead);
}
}
}
for (Fuel__c lead : [SELECT Name FROM Fuel__c WHERE Name IN :leadMap.KeySet()]) {
Fuel__c newLead = leadMap.get(lead.Name);
newLead.Name.addError('This Fuel already exists.');
}
}
i need to create a test class for this and i have no idea how. can anyone help me please?
- sp13
- December 24, 2013
- Like
- 0
- Continue reading or reply
need trigger for requriement
Ihave an account object there is one field no of opportunitys.once i had created new record with account and no of opportunitys count displayed in Account object field like no of opportunitys in detail page
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Need test class for this one
trigger trgopp2 on Opportunity (before insert,before update) {
for(Opportunity opp:trigger.new){ if(opp.Name != null){ user usr=[select id,name from user where id =: opp.ownerid]; opp.Owner_field__c=usr.name; } } }
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Trigger
iam an one req once i have created opportunity the number of opps releted accounts count displayed in account object and account having field Number of opportunities write trigger asking pls given that one
- suresh143
- December 16, 2013
- Like
- 0
- Continue reading or reply
Trigger: update child object field with parent's value (it updates via formula)
Hi swetha so you great i think so and one more is there
write trigger account and opp then once created opp how many number of opp is displyed in account object in number of opps field in acc object
- suresh143
- December 13, 2013
- Like
- 0
- Continue reading or reply
Need to test class for this one
trigger ValidateAmountValueAndTotalamount on Opportunity ( before insert, before update ) {
for ( Opportunity opp : Trigger.new )
{
if(opp.name!=null)
{
user usr=[select id,name from user where id =: opp.ownerid];
opp.Owner_field__c=usr.name;
String CSDRid= [Select Id from RecordType where RecordType.Name='Sales Opportunity-CSD'].Id;
if(opp.Stagename == 'New Opportunity' && opp.Probability == 10 && opp.RecordTypeId==CSDRid)
{
if(opp.Amount == null)
{
opp.Amount.addError('****enter something yar****');
}
if ( opp.Total_Amount__c == null )
{
opp.Total_Amount__c.addError( 'Please enter a value Total Amount.' );
}
}
- suresh143
- December 12, 2013
- Like
- 0
- Continue reading or reply
hi .The creator(Owner of the opportunity) will get copied to Initial Owner field.
.The creator(Owner of the opportunity) will get copied to Initial Owner field. for trigger pls give that code
- suresh143
- December 11, 2013
- Like
- 0
- Continue reading or reply
Trigger that send email notification when the case is updated
Hi,
I am trying to write the Trigger code when the status of the case is changed and any other changes in fields with conditional loops for changing the Mail subject.
The issue was on trigger that send the same mail subject when i changed the status or changed the iother fields in the case.
The following is my code,
trigger caseUpdationMailNotification on Case ( after update) { contact relatedCaseContact; CaseComment Cscmnt; for(case Cases :trigger.new){ relatedCaseContact = [SELECT Email FROM Contact WHERE Id = :Cases.ContactId]; Messaging.reserveSingleEmailCapacity(1); //Fetch the related case contact. Messaging.SingleEmailMessage CaseNotificationmail = new Messaging.SingleEmailMessage(); CaseNotificationmail.setToAddresses(new List<String> { relatedCaseContact.Email }); CaseNotificationmail.setReplyTo('ambigaraman@gmail.com'); CaseNotificationmail.setSenderDisplayName('Salesforce Support'); If(Cases.Status =='Working'){ CaseNotificationmail.setSubject(' Case Status updation : ' +'Changed to working. '+'Case Number:' + Cases.CaseNumber); CaseNotificationmail.setPlainTextBody('Your case Status: ' + Cases.CaseNumber +'To view your case <a href=https://na1.salesforce.com/'+Cases.Id);} If(Cases.Status =='Escalated'){ CaseNotificationmail.setSubject(' Case Status updation : ' +'Changed to Escalated. '+ 'Case Number:' +Cases.CaseNumber); CaseNotificationmail.setPlainTextBody('Your case Status: ' + Cases.CaseNumber +' has been updated.'+'To view your case <a href=https://na1.salesforce.com/'+Cases.Id); } If(Cases.Status =='closed'){ CaseNotificationmail.setSubject(' Case Status updation : ' +'Changed to closed. '+ 'Case Number:' +Cases.CaseNumber); CaseNotificationmail.setPlainTextBody('Your case Status:' + Cases.CaseNumber +' has been updated.'+'To view your case <a href=https://na1.salesforce.com/'+Cases.Id); } else{ CaseNotificationmail.setSubject(' Case updation : ' + 'Case Number:'+ Cases.CaseNumber); CaseNotificationmail.setPlainTextBody('Your case : ' + ' has been updated.'+'To view your case <a href=https://na1.salesforce.com/'+Cases.Id); } Messaging.sendEmail(new Messaging.SingleEmailMessage[] { CaseNotificationmail }); } }
If i use 'elseif', It again send the email with subject for status changed,
Can anyone help me to write the trigger that send the mail that send when we change the status only. or there is only changes in other fields(not in status) of the case?
Thanks & Regards.,
Ambiga
- AmbigaRam
- August 21, 2013
- Like
- 0
- Continue reading or reply