• Mrutyunjay
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies

Hi All,

 

I have a custom object named "church event" and another custom object named "church event relationship" which has master detail relation ship with "Account" and "Church Event".

 

My code is like this in VF Email Template.

 

****************************************************************************

<messaging:emailTemplate subject="Lecture Infomation Form" recipientType="User" relatedToType="Church_Event__c">
<messaging:htmlEmailBody >
<html>
<body>

<table>
<apex:repeat value="{!relatedTo.Lecturers_Sponsors__r}" var="line" >
           <tr>
           <td><apex:outputLabel value="{!line.Lecturer_Sponsor__r.Name}" rendered="{!IF(line.Relationship_Type__c=='Lecturer',false,true)}"/></td>             
              <td><apex:outputLabel value="{!line.Lecturer_Sponsor__r.BillingCountry}" rendered="{!IF(line.Relationship_Type__c=='Lecturer',false,true)}"/></td>             
              <td><apex:outputLabel value="{!line.Lecturer_Sponsor__r.BillingState}" rendered="{!IF(line.Relationship_Type__c=='Lecturer',false,true)}"/></td>
              <td><apex:outputLabel value="{!line.Lecturer_Sponsor__r.BillingCity}" rendered="{!IF(line.Relationship_Type__c=='Lecturer',false,true)}"/></td>
             <td><apex:outputLabel value="{!line.Lecturer_Sponsor__r.BillingStreet}" rendered="{!IF(line.Relationship_Type__c=='Lecturer',false,true)}"/></td>
           </tr>
      </apex:repeat>
</table>

 

</body> 
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

 

*************************************************************************

 When I use this template within saleforce it works fine and I got mail perfectly.

 

But when I use this from Public site I got mail with blank data.

 


 

Hi all

 

 I have used this code for my pdf out put.Except Calibri all the fonts works fine.

But if I specify Calibri then the font type changes to default font of pdf or something else.

 

<style>
    body {
            font-family:Calibri;
            font-size:65%;
            }
</style>

Hi

 

I have some code like this ,this works fine generally

 

Database.LeadConvert lc = new database.LeadConvert();

lc.setLeadId(leadid); lc.setConvertedStatus(selectstatus);

lc.setDoNotCreateOpportunity(true);

lc.setOverwriteLeadSource(false);

lc.setSendNotificationEmail(false);

Database.LeadConvertResult lcr = Database.convertLead(lc);

system.debug('leadconvert'+lcr.isSuccess());

 

 

But when i write test class for this, leadconvert result always returns false.

Any way to cover this lines of code or  any way to fix it out.

 

 Hi

 

I have a problem with bst start day and end days.

If I query some record  which have datetime field with 03/30/2009 11:1,

I get this field with one hour plus like  03/30/2009 12:10 by query.

 

Similarly with BST end time 10/25/2009 11:10 

I get one hour minus like 10/25/2009 10:10 on query.

 

This issue is created when I want to clone a record using APEX.

 

Please help me out .

 

Thanks

Message Edited by Mrutyunjay on 04-07-2009 03:30 AM
Message Edited by Mrutyunjay on 04-08-2009 10:30 PM
Message Edited by Mrutyunjay on 04-09-2009 04:18 AM

Hi 

I have created a custom page when I save this page ,I am getting  error like this.


 

Error: j_id0:form1:pgblock:j_id33:j_id66:j_id69:drpfrequency: Validation Error: Value is not valid

 

I have also check there is not any validation rule like this

This is fire just befor saving 

 

Regards

Mrutyunjay

 

I have created custom case page overriding standard functionality through controller extension

 

and I want to fire assignment rule conditionally

 

my code is here

 **************************************************

public class caseextension
{
private  Case case1;
public boolean assrulevalue;
public caseextension(ApexPages.StandardController stdController)
{
this.case1= (Case)stdController.getRecord();


}
public PageReference save()
{

AssignmentRule assgn=[Select Name, Id From AssignmentRule  where name='Testassign'];
string id=assgn.id;
if(assrulevalue==true)
{
database.DMLOptions dmo = new database.DMLOptions();
dmo.AssignmentRuleHeader.assignmentRuleId=id;
 dmo.AssignmentRuleHeader.useDefaultRule= false;
case1.setOptions(dmo);
   //mailerror('testing');
}
//mailerror('testing'+id);

 insert case1;
//database.insert(case1, dmo);
PageReference pageRef = new PageReference('/' + case1.id);
pageRef.setRedirect(true);
return pageRef;

}

public boolean getassrule()
{
    return assrulevalue;
}
public void setassrule(boolean value)
{
    assrulevalue=value;
}

**********************************************************

 

So what wrong with this code.

Action support for select list is not fired untill require field is filled.
I have used require attribute= true in inputfield.and immidiate=true in action support
Is there any solution without fill require field i can fire ajax or action support event

This is visualforce page showing data in a Datatable with some child control on header and in each row.

I want to save data on a custom Salesforce object from this datatable,so how can I fetch data from each row as well as from header.

 

PublicationMethodList PriceNoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$
NoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$
NoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$
NoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$
NoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$
NoneCons DiscNew CustTrans DiscForeign PostReg DiscAgency DiscOther %Other $
%$

%$
Remote Site FeeAdditional FeeAgency FeeStandard PriceNon-Standard PriceTax Net Amount
Science Classic (1880-1996)Annual Subscription$2200.0 $2200.0 $2200.0 $2200.0 $2200.0 $2200.0 $2200.0 $2200.0 $ $ $ $2200.0 % $2200.0

Hi all

 

 I have used this code for my pdf out put.Except Calibri all the fonts works fine.

But if I specify Calibri then the font type changes to default font of pdf or something else.

 

<style>
    body {
            font-family:Calibri;
            font-size:65%;
            }
</style>

Hi, I am new to visualforce and would like to know if it is possible to show the fields from a child table on the Opportunity page layout using visualforce. Also, is it possible to show them for data entry too. Hope I am clear with my question.

Thanks in advance,
Ravi.

  • October 16, 2008
  • Like
  • 0
I have a list of a custom object that I display on a VisualForce page using a dataTable. The dataTable has four columns. The first is outputText, the second and third inputText, and the fourth inputCheckbox. The user modifies the contents of the inputText and inputCheckbox and then saves (updates). Initially everything works as expected. However after a few successful saves I always get the following error message:

<apex:inputText> element value must resolve to a String type!

If I log out, close the browser, and then return to the page I still get the error. I've read a few articles related to this type of functionality and my code seems to be using the correct approach.

Any thoughts on this?

Here is the code:

Code:
public class UpdateContractUsageStats {
 
        private final List<Contract_Usage_Data__c> ContractUsageData;
        
        public UpdateContractUsageStats() {
   
   ContractUsageData = [Select Id, Usage_Report_Interval_Label__c, Usage_Report_Date__c, UsageLives__c, UsageAmount__c, Usage_Report_Certified__c From Contract_Usage_Data__c Where Contract__c=: ApexPages.currentPage().getParameters().get('cid')];
        }
        
  public PageReference save() {
   try{
    update ContractUsageData;
   }
   catch(DmlException ex){
    ApexPages.addMessages(ex);
   }
   return null;
  }
        
        public List<Contract_Usage_Data__c> getContractUsageData(){
                return ContractUsageData;
        }
}

 
Code:
<apex:page controller="UpdateContractUsageStats">
 <apex:messages />
    <apex:form >
        <apex:dataTable value="{!ContractUsageData}" var="intervalData" id="theTable" rowClasses="odd,even" styleClass="tableClass">
            <apex:column width="25%">
                    <apex:facet name="header">Interval</apex:facet>
                    <apex:outputText value="{!intervalData.Usage_Report_Interval_Label__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Lives</apex:facet>
                    <apex:inputText value="{!intervalData.UsageLives__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Amount</apex:facet>
                    <apex:inputText value="{!intervalData.UsageAmount__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Certified</apex:facet>
                    <apex:inputCheckbox value="{!intervalData.Usage_Report_Certified__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
        </apex:dataTable>
        <apex:commandButton value="Update Statistics" id="theButton" action="{!save}"/>
    </apex:form>
</apex:page>

 


  • October 16, 2008
  • Like
  • 0
Hello everyone, just wanted to share with the community this custom component I made and give something back for the help I've received. :smileyhappy:

The purpose of the component is to enable autocomplete in lookup fields. I used the autocomplete js created by Jim Roos:
(http://www.jimroos.com/2007/05/ajax-autocomplete.html) but made some modifications to it so that it could interact with an Apex controller among some other things...

So my idea was that if you were making a VF page that had an inputfield that was related to a lookupfield you would just insert this autocomplete component to that inputfield. Something like this:

Code:
           <apex:inputField value="{!Contact.accountid}" id="accname" styleClass="cField">
<c:autocomplete ObjectName="Accounts" InputId="{!$Component.accname}" AutoCompleteId="accACid" ClassName="autocomplete300"/>
</apex:inputField>

The component has 4 parameters:

The name of the object or custom object that the inputfield relates to (new objects must be added inside the apex classes since i had some problems constructing a dynamic query).
The InputId which is used to relate the component to the input field
The id for the Component
A classname parameter that basically just defines the width of the suggestions menu.

Here's a screenshot of how it looks like in action:




Here's a link to the file containing the required files:

AutoCompleteComponent



Jonathan.


Message Edited by jonathan rico on 08-16-2008 01:55 PM

Message Edited by jonathan rico on 08-17-2008 09:04 AM
Message Edited by jonathan rico on 01-02-2010 05:01 PM