• Alex_Configero
  • NEWBIE
  • 150 Points
  • Member since 2011
  • VP Technology
  • Configero


  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 31
    Replies

 

I'm attempting my first visualforce email template (actually my first visual force anything).  We have a custom object "Customer_Support__c" which has a child object "CS_Product__c". When I try to reference the child object to insert a table of related records I get the error ErrorError: Invalid field CS_Product__c for SObject Customer_Support__c.

 

Code is below. Any guidance on where I've gone wrong would be greatly appreciated.

 

Thanks,

Rick


 

 

<messaging:emailTemplate subject="subject" 
      recipientType="User" 
      relatedToType="Customer_Support__c"
      replyTo="Richard.Methe@company.com">
<messaging:htmlEmailBody >
      <p> Dear {!relatedTo.Contact__c},</p>
      <p> Company has received communication regarding the event described below and we have logged this within our complaint system. If you have any questions or have any further information regarding this event, please contact us either  by calling (999) 999-9999 ext. 2205 or send an email to our Customer Affairs team in xxx at CustomerAffairs@Company.com.</p> 
    <p>Replacement Product is shipping on Sales Order number {!RelatedTo.Sales_Order_Number__c}.</p>
    
     <b><u>Complaint Acknowledgement:</u></b>
     <br>Ref #: {!RelatedTo.Name}</br>
     Created by: {!RelatedTo.CreatedBy}
     <br>Account: {!relatedTo.Account__c}</br>
     Communicated via: {!RelatedTo.Communicated_Via__c}
     <br>Date Communicated: {!relatedTo.Date_Communicated__c}</br>
     <p><b>Event Details:</b></p>
     Event Date: {!RelatedTo.Event_Date__c}
     <br>Patient Initials: {!relatedTo.Patient_Initials__c}</br>
     DOB: {!relatedTo.DOB__c}
     <br>Implant Date: {!relatedTo.Implant_Date__c}</br>
    <b>Event Description:</b>
    <br>{!relatedTo.Event_Summary__c}</br>
    <b>Product</b>
<table border="0" >
    <tr>
        <th>Part Number</th><th>Description</th><th>Lot Number</th><th>Serial Number</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.CS_Product__c}">
        <tr>
            <td>{!cx.Part_Number__c}</td>
            <td>{!cx.Description__c}</td>
            <td>{!cx.Lot_Number__c}</td>
            <td>{!cx.Serial_Number__c}</td>
        </tr>
    </apex:repeat>
</table> 
<b>Product Return:</b>
<br>If you have not already done so, please return the product to our {!relatedTo.Return_To__c} facilities at your earliest convenience. Be sure to include the reference number  {!RelatedTo.Name} on the outside of all packages. </br>
<br><b>Address:</b> </br>
Corporation
<br>Returned Product Analysis </br>
2433 4th Avenue
<br>sometown, WI 51803</br> 
(999) 999-9999ext. 2360  
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

 

 

 

 

 

 

 

 

I use Hyperlinks to jump to Related Lists on (rather long and crowded) pages, but would like to know if you can link to a Section within the Detail.

 

If so, what do I need to look for in the page source?

 

Any help is appreciated.

Hi,

 

Let me first give you the setup so you know what is going on. We have a custom object called Facility Lease Agreement(FLA). There is a related list with all the Assets tied to this record. If you click 'New Asset' it will take you to the edit page of the Asset object where you can enter in the new Asset. After you hit save it will save the record and bring you to the detail page of that Asset.

 

So here is my question.

 

Is it possible to set it up to where if you hit save on that Asset it will save the record and then bring you back to the FLA instead of the Asset???

 

The reason we want to do this is because if you have to add multiple assets to one FLA you have to constantly navigate back to the FLA.

 

If anyone knows how I can do this with a custom button or a trigger that would be awesome!

 

Thanks

  • April 11, 2011
  • Like
  • 0

Hi

 

I'm trying to apply an external CSS to a table but whatever I tried did no work.

This is my code:

 

<apex:page Controller="SearchCheckedOutBooksController" showHeader="false" Tabstyle="Library_Order__c">
<apex:stylesheet value="{!URLFOR($Resource.tableStyles, 'source/style.css')}"/> 
  <apex:sectionHeader subtitle="ECI Information Center Portal"/>
   <style>
      .activeTab {background-color: #2369FF; color:white; background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; background-image:none}
   </style>

   <apex:form >

	   <apex:tabPanel switchType="client" selectedTab=" tabCard" id="InfoCenterTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">   
	
	      <apex:tab label="News" name="News" id="tabnews">
	         <apex:detail relatedList="false" title="true"/>
	      </apex:tab>
	      <apex:tab label="My Library Card" name="Card" id="tabCard">
	         
	          <apex:pageBlock title="Search My Library Orders" mode="edit">         
	               <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subscriber ID to query&nbsp;</label>
	               <apex:inputText value="{!subscriberId}"/>
	        
	               <apex:commandButton action="{!searchOrders}" value="Search" rerender="orderResults"/>                  
	          </apex:pageBlock>
	                    
	           <!-- The results for each call are handled here. -->              
	               
	            <apex:outputPanel layout="block" id="orderResults">
	                <apex:outputPanel rendered="{!IF(hasError == false,true,false)}"> 
	                    <apex:pageBlock title="Search Results">
	                        <apex:pageBlockButtons >
	
	                                <apex:commandButton value="Cancel Selected Orders" action="{!cancelOrder}" rerender="orderResults"/>
	
	                        </apex:pageBlockButtons>
	                        
	                        <apex:pageBlockSection title="Pending Orders">
								<apex:dataTable value="{!myPendingOrders}" var="entry" id="pendingTable" 
								 				styleClass="#newspaper-a">

	                                <apex:column headerValue="Select">
	                                    <apex:inputCheckbox id="orderCheckedone" value="{!entry.isSelected}" disabled="{!entry.disable}"/>
	                                </apex:column>
	                                <apex:column value="{!entry.order.Name}" headerValue="Order ID"/> 
	                                <apex:column value="{!entry.order.Type__c}" headerValue="Type"/> 
	                                <apex:column value="{!entry.order.Status__c}" headerValue="Order Status"/> 
	                                <apex:column value="{!entry.title}" headerValue="Title"/>
	                                <apex:column value="{!entry.order.Order_Date__c}" headerValue="Order Date"/>
	                                <apex:column value="{!entry.order.Fulfillment_Date__c}" headerValue="Checkout Date"/>
	                                <apex:column value="{!entry.order.Return_By__c}" headerValue="Return By"/>
								</apex:dataTable>
	                        </apex:pageBlockSection>

The styles looks like this:

 

 

#newspaper-a
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	margin: 45px;
	width: 480px;
	text-align: left;
	border-collapse: collapse;
	border: 1px solid #69c;
}
#newspaper-a th
{
	padding: 12px 17px 12px 17px;
	font-weight: normal;
	font-size: 14px;
	color: #039;
	border-bottom: 1px dashed #69c;
}
#newspaper-a td
{
	padding: 7px 17px 7px 17px;
	color: #669;
}
#newspaper-a tbody tr:hover td
{
	color: #339;
	background: #d0dafd;
}


#newspaper-b
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	margin: 45px;
	width: 480px;
	text-align: left;
	border-collapse: collapse;
	border: 1px solid #69c;
}

 

 

What am I dong wrong?

 

Thanks

 

Oded

 

Hello, I wrote a trigger for prevent duplicate account name and group__C, it works well when I create a account in account page. But it shows a error info when I convert lead to account.

 

trigger test2 on Account (before insert, before update) {
   if (Trigger.new[0].Name != NULL)  {
       Account[] acc = [ select id from account WHERE name = :Trigger.new[0].Name and group__C=: trigger.new[0].group__C];
       if (acc.size() > 0) {
           Trigger.new[0].Name.addError('Name with Group already exists');
       }
   }
}

 

Anyone can help me? Thanks!

Is it possible not to render apex:component in SPAN,  just let it rendered whatever I've coded

 

Hello fellow board members,

 

I thought I'd ask around for your opinion on the proper etiquette when marking solutions as solved.

 

Seemes to happen often that after going back and forth trying to resolve someone's issue, when the poster finally gets the answer, he/she marks one of their own posts as the solution. While I'm all for sharing and helping, it's also nice to be recognized for the effort. But I feel weird asking the original poster to give credit to me instead...

 

Thoughts?

If I created a datatable that displays all my contacts, how would I be able to create a link for my users so that when the contact name is clicked their account information is displayed? 

 

Please help. Thank you. 

I uploaded a class implementing the Database.batchable interface into our live environment. It ran with a couple of errors and I decided to remove it and go another route.

 

The problem is that I now seem to be unable to remove the class. I tried cleaning out the contents of the class, like thus:

 

 

global class CalcSummaryBatch {	
}

 

 

The class above saved successfully without any errors, but Salesforce still refuses to allow me to delete the class, or save it as Inactive.

 

Here's the error that I'm getting: "This apex class is referenced elsewhere in salesforce.com. Remove the usage and try again.: Apex Job - xxxxxxxxxxxxxxxxxxx."

 

Here's the log under Setup > Monitoring > Apex Jobs. I double-checked, and all jobs are at a Completed status:

(There are about 20 such messages as the one below, all with status "Completed", and all the Apex Job Ids are listed as why the class cannot be deleted, in the error above)

Action
 Submitted Date
Job Type
Status
Status Detail
Total Batches
Batches Processed
Failures
Submitted By
Completion Date
Apex Class
Apex Method
 <nothing listed here>
 4/10/2011 11:00 PM Batch Apex
Completed
 First error: Attempt to de-reference a null object 0 0 1 xxx 4/10/2011 11:00 PM CalcSummaryBatch  <nothing listed here>
...

Is there any method to execute SOQL with selected date on the calender?

As far as I understand, I should use action support tag and "on onclick" or "on chage" for event on visual force page.

 

I appreciate if you could help me with Apex code either..

 

Thanks

Mori 

Hi ,

I am trying to pass a column value entered in a particular row of a pageBlockTable to the VF page controller . But it is being passed to the controller as blank .
One more interesting thing I had observed is if I pass a string say "testing123" it is passed correctly whereas I am facing issues passing column value like {!product.name} as in the below code.
Can someone help me with this please.

<apex:pageBlockTable title="Product Details" value="{!ProductsDetails}" var="product" id="addProducts">
    <apex:column headerValue="Name">
                <apex:inputField value="{!product.Name}" id="nId"/>
            </apex:column>
    <apex:column headerValue="State" >
                <apex:selectList id="state"  value="{!product.state__c}" size="1" >
                <apex:selectOptions value="{!states}"></apex:selectOptions>
                <apex:actionSupport event="onblur" action="{!resetProductsList}" rerender="subBrand">
                    <apex:param name="prodName" assignTo="{!selectedName}" value="{!product.Name}"/>
                </apex:actionSupport>
                </apex:selectList>
            </apex:column>
    <apex:column headerValue="Sub Brands" >
                <apex:selectList id="subBrand" size="1" value="{!product.subBrand__c}">
                <apex:selectOptions value="{!subBrands}"></apex:selectOptions>
                </apex:selectList>
            </apex:column>  
</apex:pageBlockTable>

When a user updates a record from a particular page via sites I want to add a Hidden Form Field value that the user cannot see that will set a checkbox on the record from false to true.

 

How do I accomplish this?

Hi,

 

I have used cook book version of tabbed accounts and wanted to extend that to my custom object as well.

I have a roadblock on getting the focus of the tabs.

 

What i want is whenever users select "Contact" tab and select New contact, after creation of new contact i want the user to get back to the contact tab and not default landing tab, which is 'detail' tab.

 

Any ideas on how to accomplish this?

 

VF Page:

<apex:page standardController="Account" showHeader="true" tabStyle="account" >
     <style>
        .activeTab {background-color: #236FBD; color:white; background-image:none}
        .inactiveTab { background-color: lightgrey; color:black; background-image:none}
     </style>
     <apex:tabPanel switchType="client" selectedTab=" tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">  
       <apex:tab label="Details" name="AccDetails" id="tabdetails">
           <apex:detail relatedList="false" title="true"/>
       </apex:tab>
        <apex:tab label="Contacts" name="Contacts" id="tabContact">
           <apex:relatedList subject="{!account}" list="contacts" />
      </apex:tab>
        <apex:tab label="Opportunities" name="Opportunities" id="tabOpp">
          <apex:relatedList subject="{!account}" list="opportunities" />
       </apex:tab>
        <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
           <apex:relatedList subject="{!account}" list="OpenActivities" />
       </apex:tab>
        <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt">
           <apex:relatedList subject="{!account}" list="NotesAndAttachments" />
       </apex:tab>
    </apex:tabPanel>
  </apex:page>

 

 

Thanks,

Sales4ce

I'm trying to create a VF email template. I need to use apex:outputField rather than apex:outputText because there is a problem with GMT daylight savings when I output a date that is on summer time. apex:outputField should help me do this 

 

My code reads like this:

 

 

<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="Work__c" >
<messaging:htmlemailbody >

<apex:variable var="date" value="{!relatedTo.Start__c}"/>
            <apex:outputField value="{0, date, EEEE d, MMMM yyyy, hh:mm a}">
                                <apex:param value="{!date}" />
                            </apex:outputField>
                            

</messaging:htmlemailbody>
</messaging:emailTemplate>

 

but when I select my template  I'm getting the error:" value for outputField is not a dynamic binding!"

 

So I read up on dynamic binding in the VF guide but I'm none the wiser.

 

Can anybody help?

 

  • April 13, 2011
  • Like
  • 0

 

I'm attempting my first visualforce email template (actually my first visual force anything).  We have a custom object "Customer_Support__c" which has a child object "CS_Product__c". When I try to reference the child object to insert a table of related records I get the error ErrorError: Invalid field CS_Product__c for SObject Customer_Support__c.

 

Code is below. Any guidance on where I've gone wrong would be greatly appreciated.

 

Thanks,

Rick


 

 

<messaging:emailTemplate subject="subject" 
      recipientType="User" 
      relatedToType="Customer_Support__c"
      replyTo="Richard.Methe@company.com">
<messaging:htmlEmailBody >
      <p> Dear {!relatedTo.Contact__c},</p>
      <p> Company has received communication regarding the event described below and we have logged this within our complaint system. If you have any questions or have any further information regarding this event, please contact us either  by calling (999) 999-9999 ext. 2205 or send an email to our Customer Affairs team in xxx at CustomerAffairs@Company.com.</p> 
    <p>Replacement Product is shipping on Sales Order number {!RelatedTo.Sales_Order_Number__c}.</p>
    
     <b><u>Complaint Acknowledgement:</u></b>
     <br>Ref #: {!RelatedTo.Name}</br>
     Created by: {!RelatedTo.CreatedBy}
     <br>Account: {!relatedTo.Account__c}</br>
     Communicated via: {!RelatedTo.Communicated_Via__c}
     <br>Date Communicated: {!relatedTo.Date_Communicated__c}</br>
     <p><b>Event Details:</b></p>
     Event Date: {!RelatedTo.Event_Date__c}
     <br>Patient Initials: {!relatedTo.Patient_Initials__c}</br>
     DOB: {!relatedTo.DOB__c}
     <br>Implant Date: {!relatedTo.Implant_Date__c}</br>
    <b>Event Description:</b>
    <br>{!relatedTo.Event_Summary__c}</br>
    <b>Product</b>
<table border="0" >
    <tr>
        <th>Part Number</th><th>Description</th><th>Lot Number</th><th>Serial Number</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.CS_Product__c}">
        <tr>
            <td>{!cx.Part_Number__c}</td>
            <td>{!cx.Description__c}</td>
            <td>{!cx.Lot_Number__c}</td>
            <td>{!cx.Serial_Number__c}</td>
        </tr>
    </apex:repeat>
</table> 
<b>Product Return:</b>
<br>If you have not already done so, please return the product to our {!relatedTo.Return_To__c} facilities at your earliest convenience. Be sure to include the reference number  {!RelatedTo.Name} on the outside of all packages. </br>
<br><b>Address:</b> </br>
Corporation
<br>Returned Product Analysis </br>
2433 4th Avenue
<br>sometown, WI 51803</br> 
(999) 999-9999ext. 2360  
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

 

 

 

 

 

 

 

 

We have a custom object NRProducts__c that is made up of all of our products. We want to be able to import a file update (via import wizard) to update inventory levels. The import file will not be based on the Name record, but rather an external number (Model_Number__c). Our goal is that if a new Model_Number exist in the import file that a new record is inserted with the default name "NEWPRODUCT". Below is the trigger that was created, but when we run an import with a new Model Number and Name as null/blank we get an email saying the record already exist (see below)

trigger ProductTrigger on NRProducts__c (before update, before insert) {
for(NRProducts__c r : Trigger.new){
if(r.Name == null && r.Name.length() <= 0){
r.Name = 'NEWPRODUCT';
}
}
}


Email from SF-
Force.com Sandbox

Alert: All information in the import file was already in salesforce.com.

Result: No data was created or modified in salesforce.com.

If you encounter any problems or have any questions, please contact us by clicking Help & Training at the top right of any salesforce.com page and choosing the My Cases tab.

Thank you!

Customer Support
salesforce.com


Any ideas how to make this work?

  • April 12, 2011
  • Like
  • 0

I use Hyperlinks to jump to Related Lists on (rather long and crowded) pages, but would like to know if you can link to a Section within the Detail.

 

If so, what do I need to look for in the page source?

 

Any help is appreciated.

Hi,

I'm trying to create a custom detail view for a custom object and implement inline edits. However, the page is not only used to edit the custom object (Test_Parent__c) but also its related objects (Test_Child__c). Here is the controller:

 

 

public class TestController
{

    public Test_Parent__c rep {get; set;}
    public List<Test_Child__c> recs {get; set;} 
    
    public TestController() {
        String id = ApexPages.currentPage().getParameters().get('id');

        rep = [select id, Test_Text__c from Test_Parent__c where Id = :id][0];
        recs = [select id, Hours__c from Test_Child__c where Test_Parent__r.Id = :rep.Id];
    }

    public PageReference save() {
        update rep;
        update recs;
        return null;
    }

}

 and here is the visualforce for this page:

 

 

<apex:page controller="TestController" > 
<apex:form >
<apex:commandButton action="{!save}" id="saveButton" value="Save"/>
<apex:inlineEditSupport>
  <table border="1" bordercolor="black">
      <tr>
          <td>Parent Name:</td><td><apex:outputField value="{!rep.Test_Text__c}" ><apex:inlineEditSupport />
          </apex:outputField></td>
      </tr>
  </table>
<apex:repeat value="{!recs}" var="rec">
    Child Hours: <apex:outputField value="{!rec.Hours__c}"><apex:inlineEditSupport />
          </apex:outputField>
</apex:repeat>
</apex:inlineEditSupport>
</apex:form>
</apex:page>

Now, when I use the inline edit feature, the parent rep objects gets update and the child does not get updated. I played around with placing the inlineEditSupport tag inside the form and also inside the individual outputField records. I wasn't able to get this to work consistently to update both records at the same time. I would sometimes see that the child related record will get updated and most times it would not. 

 

Any suggestions or ideas?

 

 

Hi,

  I have to create custom fields to show the Last activity date and Number of activities for a lead in the lead detail section.

How can I do that? Is it possible to show this information in Lead?

Thanks and looking forward for an answer.

  • April 11, 2011
  • Like
  • 0

Hi,

 

Let me first give you the setup so you know what is going on. We have a custom object called Facility Lease Agreement(FLA). There is a related list with all the Assets tied to this record. If you click 'New Asset' it will take you to the edit page of the Asset object where you can enter in the new Asset. After you hit save it will save the record and bring you to the detail page of that Asset.

 

So here is my question.

 

Is it possible to set it up to where if you hit save on that Asset it will save the record and then bring you back to the FLA instead of the Asset???

 

The reason we want to do this is because if you have to add multiple assets to one FLA you have to constantly navigate back to the FLA.

 

If anyone knows how I can do this with a custom button or a trigger that would be awesome!

 

Thanks

  • April 11, 2011
  • Like
  • 0

Hi

 

I'm trying to apply an external CSS to a table but whatever I tried did no work.

This is my code:

 

<apex:page Controller="SearchCheckedOutBooksController" showHeader="false" Tabstyle="Library_Order__c">
<apex:stylesheet value="{!URLFOR($Resource.tableStyles, 'source/style.css')}"/> 
  <apex:sectionHeader subtitle="ECI Information Center Portal"/>
   <style>
      .activeTab {background-color: #2369FF; color:white; background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; background-image:none}
   </style>

   <apex:form >

	   <apex:tabPanel switchType="client" selectedTab=" tabCard" id="InfoCenterTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">   
	
	      <apex:tab label="News" name="News" id="tabnews">
	         <apex:detail relatedList="false" title="true"/>
	      </apex:tab>
	      <apex:tab label="My Library Card" name="Card" id="tabCard">
	         
	          <apex:pageBlock title="Search My Library Orders" mode="edit">         
	               <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subscriber ID to query&nbsp;</label>
	               <apex:inputText value="{!subscriberId}"/>
	        
	               <apex:commandButton action="{!searchOrders}" value="Search" rerender="orderResults"/>                  
	          </apex:pageBlock>
	                    
	           <!-- The results for each call are handled here. -->              
	               
	            <apex:outputPanel layout="block" id="orderResults">
	                <apex:outputPanel rendered="{!IF(hasError == false,true,false)}"> 
	                    <apex:pageBlock title="Search Results">
	                        <apex:pageBlockButtons >
	
	                                <apex:commandButton value="Cancel Selected Orders" action="{!cancelOrder}" rerender="orderResults"/>
	
	                        </apex:pageBlockButtons>
	                        
	                        <apex:pageBlockSection title="Pending Orders">
								<apex:dataTable value="{!myPendingOrders}" var="entry" id="pendingTable" 
								 				styleClass="#newspaper-a">

	                                <apex:column headerValue="Select">
	                                    <apex:inputCheckbox id="orderCheckedone" value="{!entry.isSelected}" disabled="{!entry.disable}"/>
	                                </apex:column>
	                                <apex:column value="{!entry.order.Name}" headerValue="Order ID"/> 
	                                <apex:column value="{!entry.order.Type__c}" headerValue="Type"/> 
	                                <apex:column value="{!entry.order.Status__c}" headerValue="Order Status"/> 
	                                <apex:column value="{!entry.title}" headerValue="Title"/>
	                                <apex:column value="{!entry.order.Order_Date__c}" headerValue="Order Date"/>
	                                <apex:column value="{!entry.order.Fulfillment_Date__c}" headerValue="Checkout Date"/>
	                                <apex:column value="{!entry.order.Return_By__c}" headerValue="Return By"/>
								</apex:dataTable>
	                        </apex:pageBlockSection>

The styles looks like this:

 

 

#newspaper-a
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	margin: 45px;
	width: 480px;
	text-align: left;
	border-collapse: collapse;
	border: 1px solid #69c;
}
#newspaper-a th
{
	padding: 12px 17px 12px 17px;
	font-weight: normal;
	font-size: 14px;
	color: #039;
	border-bottom: 1px dashed #69c;
}
#newspaper-a td
{
	padding: 7px 17px 7px 17px;
	color: #669;
}
#newspaper-a tbody tr:hover td
{
	color: #339;
	background: #d0dafd;
}


#newspaper-b
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	margin: 45px;
	width: 480px;
	text-align: left;
	border-collapse: collapse;
	border: 1px solid #69c;
}

 

 

What am I dong wrong?

 

Thanks

 

Oded

 

I have a custom Date field called 'Loss Date' (Loss_Date__c). 
I have another Custom formula (date) field called 'SOL Date' (SOL_date__c)
The 'SOL Date' needs to equal a date exactly 2 years in the future from the Loss Date (accounting for Leap years)

The formula I have is below.

Any Ideas where its wrong?

 

 

DATE(Year(Loss_Date__c)+ floor((MONTH(Loss_Date__c) + 24 -1) / 12), mod(MONTH(Loss_Date__c) + 24 / 12) + 1, day(Loss_Date__c)) - 1