• deepu.sandeep
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 43
    Replies

Hi,

This is my Trigger for Updating field on Opportunity when Account field updates


trigger OpportunityNotesUpdate on Account (after insert, after update) {

list<Account> Acc = new list<Account>();

Acc=[select id, Partnership_Notes__c, (select id, Notes__c, Accountid from Opportunities) from Account];

list<Opportunity> Opp = new list<Opportunity>();
for(Account accnt : Acc)
{
for(Opportunity Oppty : accnt.Opportunities )
{
if(accnt.Partnership_Notes__c!=Oppty.Notes__c)
{
Oppty.Notes__c=accnt.Partnership_Notes__c;
Opp.add(Oppty);
}

}
}

if(!Opp.isEmpty())
Update Opp;
}

This is my Test class for above trigger


@isTest(SeeAllData=TRUE)
private class TestOpportunityNotesUpdate {

static testMethod void OppNotesUpdate() {
Account acc = new Account(Name='Coca Cola', Type='Business',Partnership_Notes__c='Sample Notes');
insert Acc;
Opportunity Opp= new Opportunity(Name='Coca Cola',Accountid=acc.Id,Opp_Country__c='Kenya',StageName='Confirmed',CloseDate=Date.today(),Notes__c='SampleNotes2');
insert Opp;
Opp.Notes__c=Acc.Partnership_Notes__c;
update opp;
}
}

 

I'm getting the following test failure

 

system.limitexception too many query rows 50001 at line 15 i.e at query row

 

can anyone help me out in this issue

 

 

Thanks in Advance
Sandeep

 

 

Hi,

 

I need to dispaly a set of records in a page.

 

i've done this by using PageBlock table and standardsetcontroller.

 

i'm querying the list of contact records and passing the list to standardsetcontroller and assigning that standardsetcontroller reference to PB table.

 

Here i have one condition before sending the result set to standardsetcontroller i'm masking one field value

if(field1===true)

field2='***************';

 

I'm getting what i desired i.e. masking field value before it display, but i'm getting following exception.

 

How can i avoid this error "Modified rows exist in the records collection!"

 

Thanks,

Sandeep

Hi,

 

I'm trying to insert a record in to cases object with attachment. Here ineed to put one condition i.e. 

if attachment size is greater thhan 10 mb then record should not insert and a message has to display like"attachment size exceeded limit is 10 mb". I'm trying with the below code its not working can anyone help mein this issue.

 

public with sharing class LibraryAskUsRequestController {

/*
* @description Property section
*/
public String librarycontent { get; set; }
public Case request{get; set;}
public Attachment att {get; set;}
public boolean FacultyResearchRequest {get; set;}
public Transient Blob filebody { get; set; }
public Transient Blob attbody { get; set; }
public String contentType { get; set; }
public Boolean incorrect_Captcha {get;set;}
public boolean attsize_exceeded { get; set; }
public String filename{ get; set; }
public integer attsize {get; set; }

/*
* @description Constructor
*/
public LibraryAskUsRequestController() {

request = new Case();
Attachment att = new Attachment();
librarycontent = TextManagerUtils.getAppText(CoreConstants.ApplicationId.core.name(), CRMCoreConstants.TM_LIBRABY_ASKUS_CONTENT);

}
/*
* @description this method is used to insert new record on clicking Submit button
*/
public PageReference Save() {

try{
if(Recaptcha.response!='') {
/* verifying recapthca */

if(Recaptcha.getVerify())
{
if(attbody!=null)
{
If(attbody.size()>10485760 ){
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.WARNING, 'This file exceeds the maximum size limit of 10MB.'));
return null;
}
}
else{

request.Request_Type__c='Ask Us';
request.Origin='Web';
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= true;
dmo.EmailHeader.triggerAutoResponseEmail = true;
request.setOptions(dmo);

if(attbody!=null){

att = new Attachment();
att.body = attbody;
att.Name=filename;
att.BodyLength=10485760;
att.ContentType=contentType;
att.ParentId = request.Id;
insert att;

attbody=null;
att.Body=null;
}
}

insert request;
PageReference confirmation = new PageReference('http://www.google.com');
return confirmation;


}

else{
incorrect_Captcha=true;
return null;
}
}
else{
incorrect_Captcha=true;
return null;
}
}

catch(Exception e) {
ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.WARNING, e.getMessage()));
}
finally
{
att = new Attachment();
}

return null;
}

}

Hi All,

 

I've  updated API version manually to Classes, Triggers & Components,What about other Metadata like, 


Object
Site
Config - Assignment Rule
Layout
App
Static Resources
S-Control
Config - Tab
Workflows 
Report - Report Type etc..,
Are they going to get updated automatically. or I need to do anything manually for those things to upgrade API Verson to 27.0

 

Thanks in Advance

Sandeep

Hi,

 

I have a field called Service Type which is of type Picklist Multiselect and another field called Other which is of type Text.

 

Now my problem Service Type Field  has a value Other as one of the values in Picklist multiselect,

if the Service Type Value is "Other" then the Value entered in the Text field Other should be added to Picklist Multiselect Dynamically through apex code. I have to use this in Apex Webservice code

 

Can anyone suggest me to come out of this prob

 

Tanks in Advance

Sandeep Kumar.

 

Hi Folks,

                I wrote a code for multiselect picklist, now the problem is when i am selecting multiple values in picklist an submitting form if any other field value got error in page gets refreshed and validation error msg is  showing  and these multiselect picklist values getting unselected it should not happen like dat. can anyone suggest me to get out of dis.

here is the code

 

Apexpage

-----------------------------

<tr>
                        <td align="right">Select what describes your organization's
                        activity best :<br />
                        (Ctr + Click for multiple selection)<br />
                        (Command key on a Mac)</td>
                        <td valign="top"><apex:selectList styleclass="textboxreddrop"
                            size="4" multiselect="true" id="activity" value="{!activity}">
                            <apex:selectOptions value="{!SOption2s}" />
                        </apex:selectList></td>
                        <td>&nbsp;</td>
                        <td align="right" valign="top">Annual Operating Budget ($)</td>
                        <td valign="top"><apex:inputText styleclass="textboxred"
                            id="Annualbudget"
                            onkeyup="textLimit('{!$Component.Annualbudget}',20);"
                            value="{!Annualbudget}"></apex:inputText></td>
                    </tr>

 

 

Controller

------------------------------------

public List<SelectOption> getSOption2s()
    {
        List<SelectOption> options = new List<SelectOption>();
        //options.add(new SelectOption('None','--None--'));        
        Schema.DescribeFieldResult fieldResult = ACT_Interest__c.ORG_CSI_Tags__c.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for(Schema.PicklistEntry p : ple)
        options.add(new SelectOption(p.getValue(), p.getValue()));        
        return options;
    }

 

 

 

Thanks In Advance

Hi

    i need to write a trigger on contact that have a related list contactcommitments in contacts if that related records are there then i have is commitment field on contact it has to become true otherwise false .

can anyone help me out.

 

hi

     i wrote a code for displaying account and its related contacts using wrapperclass

now my requirement is i have button called show contacts if i click dat button it has to show account and its related contacts .

i am pasting  my code here can anyone do modifications and revert.

 

----------------------vfpage-----------------------

<apex:page controller="MainWrapperClass">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!DifferentObject}" var="Dodata">
<apex:column value="{!Dodata.Accname}" headerValue="Account"/>
<apex:column value="{!Dodata.Conname}" headerValue="Contact"/>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:commandButton value="Show Contacts" action="{!contacts}"/>
</apex:form>
</apex:page>

 

 

---------------------------controller-------------------------

 

public Class MainWrapperClass
{

public string Differentobject{get;set;}
public String Accname{get;set;}
public String Conname{get;set;}
public String AccountName='';
public String ContactName='';
public id id1='0019000000Cd9lLAAR';
public id id2='0039000000DNmUS';

public WrapperClass getDifferentObject()
{
Account Varacc=[Select id,name from Account where id=:id1];

AccountName=Varacc.name;
wrapperClass Wc=new wrapperClass(AccountName,ContactName);
return wc;
}

public PageReference contacts()
{

List<Contact> Varcon=[Select Accountid,lastname from Contact where Accountid in(select id from account where id=:id1)];

if(!Varcon.isEmpty())
{

for(Contact cnt: Varcon)
//for(Integer i=0;i<=1;i++)
{
if(cnt.Lastname!=null)
{
ContactName+=cnt.Lastname+',';
}
}
}

return null;
}
public Class wrapperClass
{
public String Accname{get;set;}
public String Conname{get;set;}
public wrapperClass(String Aname,String Cname)
{
Accname=Aname;
Conname=Cname;
}
}


}

 

Thanksin advance

 

IS it possible to display 2 different objects fields on same vf page.

 

for example i need in a table i need to display account name an related records in another column .

is it possible can anyone suggest me.

hi 

    i created a vf page called login page and for the first time the user has to register  after registering the user will get the mail of login credentials and then he logs-in. if the user is logging in first time the page has to redirect to password change page and if user is not logging in first time and the page has to redirect to application page. and for the first time after registering if he clicks sign-up button the firsname,lastname,email fields has to insert in to contact.

now my problem is how can i check dat the user is logging for the first time r not and then redirecting pages as said above.

 

i am sending the code waat i hav written can anyone helpme out

 

 

controller

----------------------------------------

public with sharing class logincntrlr {

public contact con;
public String autopassword{get;set;}
public String firstname{get;set;}
public String lastname{get;set;}
public String email{get;set;}

public static String getautopassword(Integer len)
{
Blob blobKey = crypto.generateAesKey(128);
String key = EncodingUtil.convertToHex(blobKey);
System.debug(key);
return key.substring(0,len);
}

public logincntrlr(){
l= new Logins__c();
}

public boolean emailsentflag{get;set;}

public PageReference sendEmail()
{


String autopassword =logincntrlr.getautopassword(6);
l.autopassword__c=autopassword;
l.First_Name__c=firstname;
l.Last_Name__c=lastname;
l.Email__c=email;




ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Login Details has been mail to your Registered mail Address .'));

Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();

String [] toAddresses = new String[] {l.Email__c};
email.setToAddresses(toAddresses );
email.setSubject('Username & password');
emailsentflag = true;
email.setHtmlBody('Username: ' + l.Email__c +'<br/> password:'+ l.autopassword__c+
'<br/>To log-in<br/> <a href=https://c.ap1.visual.force.com/apex/loginpage><br/>click here.</a>');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});

insert l;
Contact con=new contact(lastname= l.Last_Name__c,firstname=l.First_Name__c,email=l.Email__c);
Insert con;

l= new Logins__c(Contact__c=con.id);

return null;
}

public Logins__c l{get;set;}
public PageReference save()
{
con=[select id,firstname,lastname,email from contact where id=:con.id];
if(l.Email__c==con.email)
{
pagereference p = new pagereference('/apex/confirmpwdpage');
p.setredirect(true);
}
else
{
pagereference p = new pagereference('/apex/endeavor2012regform2');
p.setredirect(true);
}
insert l;

return null;
}


}

 

 

 

 

vf page---------

-----------------------------------

<apex:page controller="logincntrlr" sidebar="false">
<apex:pageMessages />
<apex:form id="theForm"><br /><br /><br />
<apex:pageBlock >
<apex:pageBlockButtons location="bottom">

<table cellpadding="5" align="center" >
<tr><td><b>Already Registered User</b> Sign-in </td>
<td><b>New User</b> Sign-up</td>
</tr>
<tr>
<td>
<table>
<div id="myDiv" style="color:#FF0000;"></div>
<tr>
<td><b><apex:outputLabel for="User Name">User Name:</apex:outputLabel></b></td>
<td><apex:inputField value="{!l.Name}" id="username"/></td>
</tr>

<tr>
<td><b><apex:outputLabel for="Password">Password:</apex:outputLabel></b></td>
<td><b><apex:inputsecret value="{!l.password__c}" id="password"/></b></td>
</tr>
<tr>
<apex:inputHidden value="{!autopassword}" id="randomfield"/>
</tr>
<td></td>
<tr><td>
<apex:commandButton value="Sign-in" action="{!save}" onclick="return validateFields('{!$Component.username}','{!$Component.password}');" id="loginButton" /></td></tr>

</table>

</td>
<td>
<table cellspacing="0">
<tr>
<td><b><apex:outputLabel for="First Name">First Name</apex:outputLabel></b></td>
<td><b><apex:inputtext value="{!firstname}"/></b></td>
</tr>
<tr>
<td><b><apex:outputLabel for="Last Name">Last Name</apex:outputLabel></b></td>
<td><b><apex:inputtext value="{!lastname}" /></b></td>
</tr>
<tr>
<td><b><apex:outputLabel for="EMail">E-Mail:</apex:outputLabel></b></td>
<td><b><apex:inputtext value="{!email}" id="email"/></b></td>
</tr>

<tr><td><apex:commandButton value="Sign-up" action="{!sendEmail}"/></td></tr>
</table>
</td>
</tr>

</table>

<html>
<head>
<script>
function validateFields(username,password)
{
var usrName=document.getElementById(username).value;
var password=document.getElementById(password).value;

var ni1 = document.getElementById('myDiv');
ni1.innerHTML = '';

if(usrName=='' || password=='')
{
ni1.innerHTML = 'Please fill Username and Password';
return false;
}
else
{
return true;
}

}

</script>
</head>
</html>
<script>
if({!emailsentflag})

alert("email sent sucess");
</script>


</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

How can i do dat any one suggest me

Thanks in advance

Hi

 

        I created one  vf page and there are some fields on it along with dat fields i have firstname,lastname,email fields and

i need to insert with these fields in to contact  object and remaining fields to custom object.

 

How can i do dat can any one suggest me. 

Hi,

     I need to generate autopassword of length 6 chars to an user to login to my site and then after login he sets the new password now i need to generate autopassword an assign it to a field value, how could i do dat.

If any one send me a code i am greatful to him.

Thanks in advance

Hi

I have created afield called Email in vf page and a button sendemail, this is for custom object

Now my problem is i want to send an e-mail to the mail whatever i have given in email field when i click a sendemail button.How could i d datb  can any one send me code i am a newbie to salesforce

I have created afield called Email in vf page and a button sendemail, this is for custom object

Now my problem is i want to send an e-mail to the mail whatever i have given in email field when i click a sendemail button.How could i d datb  can any one send me code i am a newbie to salesforce

 

 I am getting validation error like ths after clicking submit button.

 

Visualforce Error


System.DmlException: Upsert failed. First exception on row 0 with id a0090000002qLz4AAE; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Start Date must be less than End Date: [StartDate__c]
Class.input1.save: line 36, column 1

 

i want error messages near the field in vf page what i have to do for dat.

Will the validations rule work in vf page what ever we have kept in object.

Hi there,

               i need a table with 4 columns and 3 rows with manual entry of data and i wrote a code like this

 

<apex:pageBlockSection title="EDUCATION">
  <table border="1">
     <tr>
      <td>College/University</td>
      <td>Year Granted</td>
      <td>Degree Granted</td>
      <td>Major</td>
     </tr>
     <tr>
      <td><input type="text" value="{!e.College_University__c}"/></td>
      <td><input type="text" value="{!e.Year_Granted__c}"/></td>
      <td><input type="text" value="{!e.Degree_Granted__c}"/></td>
      <td><input type="text" value="{!e.Major__c}"/></td>
     </tr>
     <tr>
      <td><input type="text" value="{!e.College_University1__c}"/></td>
      <td><input type="text" value="{!e.Year_Granted1__c}"/></td>
      <td><input type="text" value="{!e.Degree_Granted1__c}"/></td>
      <td><input type="text" value="{!e.Major1__c}"/></td>
     </tr>
     <tr>
      <td><input type="text" value="{!e.College_University2__c}"/></td>
      <td><input type="text" value="{!e.Year_Granted2__c}"/></td>
      <td><input type="text" value="{!e.Degree_Granted2__c}"/></td>
      <td><input type="text" value="{!e.Major2__c}"/></td>
     </tr>
     
  </table>   
   
</apex:pageBlockSection>

 

 

i got a table with 3 empty rows,

now i need to bind these row values to fields in object,how can i do that can any one suggest me.

 

 

Hi,

      I have felds like  College/University, Year Granted, Degree Granted, Major and  College/University1, 

Year Granted1, Degree Granted1, Major1 and  College/University2, Year Granted2, Degree Granted2, Major2

 

and i have wrote a code like this

 

<apex:pageBlockTable value="{!con}"  rows="3" columns="4" var="cc">
     <apex:column > <apex:facet name="header">College/University</apex:facet> <apex:inputfield value="{!cc.College_University__c}"/></apex:column>
     <Apex:column > <apex:facet name="header">Year Granted</apex:facet> <apex:inputfield value="{!cc.Year_Granted__c}"/></apex:column>
     <Apex:column > <apex:facet name="header">Degree Granted</apex:facet> <apex:inputfield value="{!cc.Degree_Granted__c}"/></apex:column>
     <Apex:column > <apex:facet name="header">Major </apex:facet> <apex:inputfield value="{!cc.Major__c}"/></apex:column>
  </apex:pageBlockTable>

 

My problem is ineed to bind the manually entered row values to these field values, how can i do that anyone suggest me.

Hi There,

                i wrote a code like dis

 

------ vf page----------

 

<apex:page controller="clscontact" >

  <apex:pageBlock >

      <apex:pageBlockTable value="{!con}" rows="3" columns="4" var="cc">

      <apex:column style="width:20px;"  ><apex:facet name="header">Name</apex:facet> {!cc.name}</apex:column>

        <Apex:column style="width:50px;"  ><apex:facet name="header">Email</apex:facet> {!cc.email}</apex:column>

          <Apex:column ><apex:facet name="header">Phone</apex:facet> {!cc.phone}</apex:column>

              <Apex:column ><apex:facet name="header">Account </apex:facet> {!cc.account.name}</apex:column>

      </apex:pageBlockTable>

 

  </apex:pageBlock>

</apex:page>

 

------------- Apex controller ----------

 

public class clscontact

{

public list<contact>con{get;set;}

public clscontact()

{

    con=[select name,email,phone,account.name from contact];

}

 

 

}

 

 

i am getting 4 cols and 3 rows but i am unable to enter a value in rows.

how can i enter a value in rows anyone suggest me...

Hi There,

                  How can i display a table with 4 columns and 3 empty rows in a vf view page.

Anyone sugggest me how can i do that.

Hi,

This is my Trigger for Updating field on Opportunity when Account field updates


trigger OpportunityNotesUpdate on Account (after insert, after update) {

list<Account> Acc = new list<Account>();

Acc=[select id, Partnership_Notes__c, (select id, Notes__c, Accountid from Opportunities) from Account];

list<Opportunity> Opp = new list<Opportunity>();
for(Account accnt : Acc)
{
for(Opportunity Oppty : accnt.Opportunities )
{
if(accnt.Partnership_Notes__c!=Oppty.Notes__c)
{
Oppty.Notes__c=accnt.Partnership_Notes__c;
Opp.add(Oppty);
}

}
}

if(!Opp.isEmpty())
Update Opp;
}

This is my Test class for above trigger


@isTest(SeeAllData=TRUE)
private class TestOpportunityNotesUpdate {

static testMethod void OppNotesUpdate() {
Account acc = new Account(Name='Coca Cola', Type='Business',Partnership_Notes__c='Sample Notes');
insert Acc;
Opportunity Opp= new Opportunity(Name='Coca Cola',Accountid=acc.Id,Opp_Country__c='Kenya',StageName='Confirmed',CloseDate=Date.today(),Notes__c='SampleNotes2');
insert Opp;
Opp.Notes__c=Acc.Partnership_Notes__c;
update opp;
}
}

 

I'm getting the following test failure

 

system.limitexception too many query rows 50001 at line 15 i.e at query row

 

can anyone help me out in this issue

 

 

Thanks in Advance
Sandeep

 

 

Hi,

 

I need to dispaly a set of records in a page.

 

i've done this by using PageBlock table and standardsetcontroller.

 

i'm querying the list of contact records and passing the list to standardsetcontroller and assigning that standardsetcontroller reference to PB table.

 

Here i have one condition before sending the result set to standardsetcontroller i'm masking one field value

if(field1===true)

field2='***************';

 

I'm getting what i desired i.e. masking field value before it display, but i'm getting following exception.

 

How can i avoid this error "Modified rows exist in the records collection!"

 

Thanks,

Sandeep

Hi,

 

I'm trying to insert a record in to cases object with attachment. Here ineed to put one condition i.e. 

if attachment size is greater thhan 10 mb then record should not insert and a message has to display like"attachment size exceeded limit is 10 mb". I'm trying with the below code its not working can anyone help mein this issue.

 

public with sharing class LibraryAskUsRequestController {

/*
* @description Property section
*/
public String librarycontent { get; set; }
public Case request{get; set;}
public Attachment att {get; set;}
public boolean FacultyResearchRequest {get; set;}
public Transient Blob filebody { get; set; }
public Transient Blob attbody { get; set; }
public String contentType { get; set; }
public Boolean incorrect_Captcha {get;set;}
public boolean attsize_exceeded { get; set; }
public String filename{ get; set; }
public integer attsize {get; set; }

/*
* @description Constructor
*/
public LibraryAskUsRequestController() {

request = new Case();
Attachment att = new Attachment();
librarycontent = TextManagerUtils.getAppText(CoreConstants.ApplicationId.core.name(), CRMCoreConstants.TM_LIBRABY_ASKUS_CONTENT);

}
/*
* @description this method is used to insert new record on clicking Submit button
*/
public PageReference Save() {

try{
if(Recaptcha.response!='') {
/* verifying recapthca */

if(Recaptcha.getVerify())
{
if(attbody!=null)
{
If(attbody.size()>10485760 ){
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.WARNING, 'This file exceeds the maximum size limit of 10MB.'));
return null;
}
}
else{

request.Request_Type__c='Ask Us';
request.Origin='Web';
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= true;
dmo.EmailHeader.triggerAutoResponseEmail = true;
request.setOptions(dmo);

if(attbody!=null){

att = new Attachment();
att.body = attbody;
att.Name=filename;
att.BodyLength=10485760;
att.ContentType=contentType;
att.ParentId = request.Id;
insert att;

attbody=null;
att.Body=null;
}
}

insert request;
PageReference confirmation = new PageReference('http://www.google.com');
return confirmation;


}

else{
incorrect_Captcha=true;
return null;
}
}
else{
incorrect_Captcha=true;
return null;
}
}

catch(Exception e) {
ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.WARNING, e.getMessage()));
}
finally
{
att = new Attachment();
}

return null;
}

}

i currently want to access mobile number of a user from feeditem i came across the above error ,how can i access it

  suggest me.the code was executed but we share something in chatter that time  the above error is came

 

 

 

 

Thanks@Regards

Bhagi

  • June 26, 2012
  • Like
  • 0

Hi

    i need to write a trigger on contact that have a related list contactcommitments in contacts if that related records are there then i have is commitment field on contact it has to become true otherwise false .

can anyone help me out.

 

IS it possible to display 2 different objects fields on same vf page.

 

for example i need in a table i need to display account name an related records in another column .

is it possible can anyone suggest me.

Hi

 

        I created one  vf page and there are some fields on it along with dat fields i have firstname,lastname,email fields and

i need to insert with these fields in to contact  object and remaining fields to custom object.

 

How can i do dat can any one suggest me. 

Hi,

     I need to generate autopassword of length 6 chars to an user to login to my site and then after login he sets the new password now i need to generate autopassword an assign it to a field value, how could i do dat.

If any one send me a code i am greatful to him.

Thanks in advance

Hi

I have created afield called Email in vf page and a button sendemail, this is for custom object

Now my problem is i want to send an e-mail to the mail whatever i have given in email field when i click a sendemail button.How could i d datb  can any one send me code i am a newbie to salesforce

Hi,

 

  I want to display the account and related contacts in the same visual force page. Actually i am achieved this like,

i am displayed the account names in first page block and am kept the command link for that account names if we click on that command link that will displayed the contacts related to that particular account in another pageblock. But, Now i want to display the account name first and all related contacts line by line. like that  i want to displat the contacts for all accounts. please any one help me how to solve this...

 

 

example

Maple Lawn Office III
8161 Maple Lawn Blvd
Fulton, MD 20759

Contact: Lydia Chandlee
G & R Management
840 First Street, NE
Washington, DC 20002

Phone: 301-807-0271
Fax: 202-898-0053
Email: 

Contract: No
Inspection Date: 4/6/2010
Inspection Type: Annual
5 Year Test: 2012
Reg/Serial #: HO1863
Service Company: Kone
Equipment Type: Passenger Hydraulic
Annual Price (per unit): $180
Semi-Annual Prince (per unit): $80

Maple Lawn Office III
8161 Maple Lawn Blvd
Fulton, MD 20759

Contact: Lydia Chandlee
G & R Management
840 First Street, NE
Washington, DC 20002

Phone: 301-807-0271
Fax: 202-898-0053
Email: 

Contract: Yes
Inspection Date: 4/6/2010
Inspection Type: Annual
5 Year Test: 2012
Reg/Serial #: HO1863
Service Company: Kone
Equipment Type: Passenger Hydraulic
Annual Price (per unit): $180
Semi-Annual Prince (per unit): $80

 

 

 

thanks,

yamini

  • March 29, 2011
  • Like
  • 0

 

Hi, 

 

I have a radio button table in VF and I want to flip it to where it is lined up vertical. 

 

Here is the code: 

 

 

<apex:dataTable value="{!category.questions}" var="question" id="questionList" width="1000px" rowClasses="odd,even" cellPadding="3px;" border="0"> <apex:column > <B><apex:outputText value="{!question.Assessment_Question_Template__r.Question_Text__c}" /></B> </apex:column> <apex:column colspan="4"> <apex:selectRadio style="width: 100%" border="0" id="radioTable" value="{!question.Value__c}" disabled="true"> <apex:selectOption itemValue="1" itemLabel="1" /> <apex:selectOption itemValue="2" itemLabel="2" /> <apex:selectOption itemValue="3" itemLabel="3" /> <apex:selectOption itemValue="4" itemLabel="4" /> <apex:selectOption itemValue="5" itemLabel="5" /> <apex:selectOption itemValue="6" itemLabel="6" /> <apex:selectOption itemValue="7" itemLabel="7" /> </apex:selectRadio> <script> var radioTable = document.getElementById("{!$Component.radioTable}"); var el = radioTable.getElementsByTagName("TD"); el[0].style.width = "175px"; el[0].align = "center"; el[1].style.width = "95px"; el[2].style.width = "95px"; el[3].style.width = "95px"; el[4].style.width = "95px"; el[5].style.width = "95px"; </script> </apex:column>

 

 

Ideallly, it would be <column> radio button <column> < text>  

                             <column> radio button < column> <blank>

                             <column> radio button <column> < text>

                             etc. 

 

 

Might be a silly question, but from what I've read about radio buttons is they can't be stacked like that.. is that true? 

 

Thanks in advance. 

T

 

 

 

I am trying to create a Date of Birth field. Whether you are using a VF page or a regular page layout, when you use the calendar in Salesforce, it only lets you pick from years going forward. So the calendar is useless for something like a Date of Birth since obviously the year is before this year. Obviously the user can type the date, but is there any other way to adjust how the calendar behaves.