• TigerPower
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 36
    Replies

I have a working validation rule that has to be updated. Now the validation rule checks that either picklist field is selected or text field has user input (some value)


AND(
NOT(ISBLANK(TEXT(PicklistField__c ))),
NOT(ISBLANK(Text_field__c)))

This validation rule still has to work like this in the most of the cases, but there will be one new condition:
IF Another_Picklist__c has value "ABC",
user may not select PicklistField__c or fill in Text_field__c

So now there is a third field which has to be added to the already existing rule.

If Another_Picklist__c is not "ABC", the old rule should trigger just the way it is triggered right now:
AND(
NOT(ISBLANK(TEXT(PicklistField__c ))),
NOT(ISBLANK(Text_field__c)))

But if Another_Picklist equals "ABC", then user may not select PicklistField or add
value to Text_field.

Makes sense?

 

This is what I tried to do:


IF(NOT(ISPICKVAL(Another_Picklist__c, "ABC")),

(AND(
NOT(ISBLANK(TEXT(PicklistField__c ))),
NOT(ISBLANK(Text_Field__c)))),

(AND(
ISBLANK(TEXT(PicklistField__c)),
(ISBLANK(Text_Field__c)))
))

 

What happens here is that the end of the rule is not working alright. Any ideas what I'm doing wrong here?

 

Regards,

TP

I have a case where picklist field value has to be selected, or user must fill in a custom text field. In other words, whether the picklist field or the text field is required.

 

I have already a validation rule running on these same fields saying that user may only choose one of them (if the picklist is selected, the text field may not include text), but I still need to make sure that one of them is required. Is it possible to do this with single validation rule?

 

This is the current validation rule

AND(
NOT(ISBLANK(TEXT(picklist__c ))),
NOT(ISBLANK(Text_Field__c)))

 

Regards,

TP

Hey, how can I do this:

If one picklist field has value (any other than "none"), the other picklist field may not be selected (must be "none")?

Do  anyone have a solution for this? I've tried to reach to solution by using AND and OR statements (with ISPICKVAL), but I have been more or less validating the field to be required if the other field has been selected. So right now I'm doing it in the wrong way.

 

Regards,

TP

Hi there,

is it possible to automatically enable self-service portal for a contact? This could be done manually by clicking "enable self-service portal" standard button at the contact record. Could this be done automatically with an apex trigger?

 

 

Hello,

is it possible to create a case custom button to visualforce page (the page isn't standard controller)? Our visualforce page does not display at the content source. Is there a workaround to refer to visualforce page with url? I found some samples like

/apex/myPage?

 

Do somebody have a working sample?

 

BR,

TP

Hey everyone,

We need to integrate some salesforce data with external billing system. When opportunity stage is set to "Ready to invoice" should an external billing system get data from that opportunity (certain fields) and its opportunityLineItems. We thought that an outbound message would have done the trick, but the billing system does not support WSDL and they don't accept our outbound messages. 

 

What the billing system company has, is a schema sample and .dtd files. So we can process our opportunity and line item data into xml. Still there are lots of question to solve with the integration... 

 

Can you give us some advice or point of views to consider with sf integrations? There are certainly many possibilities to carry on, and some middleware companies offering their sf connectors and services. The "problem" is that there will not be hundreds or even dozens of invoices per month, and the integration monthly cost should be very reasonable.

 

Maybe the best solution for us would be a situation where everything needed for the integration would be build in our salesforce; webservice calls, apex classes and so on. 

 

Or do you have a better idea or solution for us? Let us know what you think, and share with us your thoughts about sf integrations.

 

Best Regards,

TP

 

 

Hey everybody,

Could you please give me some advice with this:

We are creating child opportunities (cloning products too) with a custom button. When one of the child opportunities' stage is changed to closed/won, should this "winning" child update its parent opportunity.

Child opportunity has a look-up relationship to its parent.

 

I though that we could use another custom button to do the update with URLFOR code (a lot like the URLFOR we have for cloning the parent opportunity in the beginning). But the problem is that the button actually creates a new opportunity, not updates the "old" one.

 

What do you think, is a trigger the only way to update a parent?

 

Best Regards,

TP

Hey, what do you think... is it possible to validate a field with a s-control (javascript)? I'm now validating SSN field with REGEX, but would like to improve the validation with javascript code.

 

Best Regards,

TP

Hey,

Can you help me out with my Visual Force page;

I have a custom object "Participation" which connects an Account to an other custom object "Lessons". Now I'm trying to collect all the participations of an Account to my VF page. With this page it should be possible to print out the information (date values) when the Account took the lesson. I'm using apex:repeat to iterate through every participation displayed at the Account tab related list. Problem is that with repeat my VF page is full of empty fields. I should be able to display custom field on the VF page only when it has a value. This means that 38 custom fields that my participations object has, should be displayed only ones at my VF page. Account participates only ones to one lesson. 

 

Explained in a complicated way?  :smileyhappy:

Is it possible to use apex repeat with condition to display only values that are not null? Or is there a better way to do this? 

 

This is the code:

 <apex:page showHeader="false" standardController="Account" renderAs="pdf">
<p><b><font face="Arial" color="#000080">Header1</font></b></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr>
    <td width="60%">
    Account Name:&nbsp;<apex:outputText value="{!Account.Name}"/><br/>
    </td>
    <td width="40%"><b><font face="Arial"></font></b><br/>
    </td>
</tr>
</table>
<br/>
<hr/>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table2">
<tr>
  <apex:repeat value="{!Account.Participations__r}" var="osa">  
       <td width="60%">
           <font face="Arial">Header2:<br/>          
              A1:&nbsp;<apex:OutputField value="{!osa.A_1__c}"/><br/>
              A2:&nbsp;<apex:OutputField value="{!osa.A_2__c}"/><br/>
              A3:&nbsp;<apex:OutputField value=" {!osa.A_3__c}"/><br/>
              A4:&nbsp;<apex:OutputField value=" {!osa.A_4__c}"/><br/>
              A5:&nbsp;<apex:OutputField value=" {!osa.A_5__c}"/><br/>            
              A6:&nbsp;<apex:OutputField value="{!osa.A_6__c}"/><br/>
              B1.1:&nbsp;<apex:OutputField value="{!osa.B_1_1__c}"/><br/>
              B1.2:&nbsp;<apex:OutputField value=" {!osa.B_1_2__c}"/><br/>
              B1.3:&nbsp;<apex:OutputField value=" {!osa.B_1_3__c}"/><br/>
              B1.4:&nbsp;<apex:OutputField value=" {!osa.B_1_4__c}"/><br/>             
              B2.1:&nbsp;<apex:OutputField value="{!osa.B_2_1__c}"/><br/>
              B2.2:&nbsp;<apex:OutputField value="{!osa.B_2_2__c}"/><br/>
              B2.3:&nbsp;<apex:OutputField value=" {!osa.B_2_3__c}"/><br/>
              B2.4:&nbsp;<apex:OutputField value=" {!osa.B_2_4__c}"/><br/>
              B2.5:&nbsp;<apex:OutputField value=" {!osa.B_2_5__c}"/><br/>           
              B2.6:&nbsp;<apex:OutputField value="{!osa.B_2_6__c}"/><br/>
              B3.1:&nbsp;<apex:OutputField value="{!osa.B_3_1__c}"/><br/>
              B3.2:&nbsp;<apex:OutputField value=" {!osa.B_3_2__c}"/><br/>
              B3.3:&nbsp;<apex:OutputField value=" {!osa.B_3_3__c}"/><br/>            
            </font>
        </td>
        <td width="40%">
           <font face="Arial">Header2:<br/>          
              B3.4:&nbsp;<apex:OutputField value=" {!osa.B_3_4__c}"/><br/>         
              B3.5:&nbsp;<apex:OutputField value="{!osa.B_3_5__c}"/><br/>
              B3.6:&nbsp;<apex:OutputField value="{!osa.B_3_6__c}"/><br/>            
              B3.7:&nbsp;<apex:OutputField value="{!osa.B_3_7__c}"/><br/>
              B3.8:&nbsp;<apex:OutputField value="{!osa.B_3_8__c}"/><br/>
              B4.1:&nbsp;<apex:OutputField value="{!osa.B_4_1__c}"/><br/>
              B4.2:&nbsp;<apex:OutputField value="{!osa.B_4_2__c}"/><br/>               
              C1:&nbsp;<apex:OutputField value="{!osa.C_1__c}"/><br/>           
              C2:&nbsp;<apex:OutputField value="{!osa.C_2__c}"/><br/>             
              C3:&nbsp;<apex:OutputField value="{!osa.C_3__c}"/><br/>            
              C4:&nbsp;<apex:OutputField value="{!osa.C_4__c}"/><br/>           
              C5:&nbsp;<apex:OutputField value="{!osa.C_5__c}"/><br/>            
              C6:&nbsp;<apex:OutputField value="{!osa.C_6__c}"/><br/>            
              C7:&nbsp;<apex:OutputField value="{!osa.C_7__c}"/><br/>           
              C8:&nbsp;<apex:OutputField value="{!osa.C_8__c}"/><br/>             
              C9:&nbsp;<apex:OutputField value="{!osa.C_9__c}"/><br/>              
              C10:&nbsp;<apex:OutputField value="{!osa.C_10__c}"/><br/>               
              C11:&nbsp;<apex:OutputField value="{!osa.C_11__c}"/><br/>              
              C12:&nbsp;<apex:OutputField value="{!osa.C_12__c}"/><br/>          
             </font>
        </td>
        </apex:repeat>
</tr>  
</table>
<br/>
<hr/>   
</apex:page>

 

Hey, can you please help me with this one:

We have a visual force email template with OpportunityLineItems. If that email is sent from Opportunity tab (standard SF email function with 'select template') everything is working fine. What we now would like to have is a similar email template with a couple of Opportunity fields and Opportunity Product Line Items together with some Contract fields in it. This email will be sent from the Contract tab.

 

This new email template (Contract tab version) is working okay with reference to related Opportunity or Account information like this:

       <td><font face="Arial">
              Description: {!relatedTo.Opportunity__r.Description}<br/> 
              Currency: {!relatedTo.Opportunity__r.CurrencyIsoCode}<br/>                
            </font>
       </td>

 

What would be the right way to have OpportunityLineItems to that email template too? I thought that I would be able to add them via Opportunity__r relationship, but I didn't.

 

Any comments, advice... help?

Hey,

how about this one?!

 

If 'Male' checkbox is checked then 'Female' checkbox has to be unchecked. How do I write a validation rule for that? And of course this goes both ways, so only one sex can be checked :smileyhappy:

 

Can you please help me with this one? 

Thank You!

 

Hey,
I'm trying to find out the upcoming key anniversary dates based on birthdate field. I have found samples that calculate age or next birthday of a person, but I would like to be able to calculate specific upcoming birthdays like 20th, 30th, 40th birthday...

Any ideas? I thought that this would have been quite simple thing to do, but it wasn't :smileysurprised:

It would be also interesting to know how to do this with months (for example: birthdate (yyyy-mm-dd) 1988-10-20
+ 240 months (=20 years)). How to find / calculate those upcoming dates??
Hey,
How do you do this: I need to get information (three fields) from my Opportunity page to Case page (with those very same fields). Is it possible to some how take care of this kind of task?

For example when converting a Lead into Account and Opportunity, the fields are autofilled by the information from that Lead. Nice and easy! I would like to do something similar with Opportunity --> Case, and be able to choose which fields are needed.

Is this a piece of cake thing or what? Help needed!

:smileyindifferent:

Yours,
TigerPower


Hi,
I'm just getting started with s-controls. Found out in the cookbook, that it's possible to debug scontrols with Firebug. How's that? How do I do it? If I'm logged in Salesforce and looking at my scontrols (and Firebug is enabled in my browser)... so the Firebug is pretty much debugging the page HTML, script etc. and not the scontrol I would like to choose.

Thank You!
"Getting started - or at least trying very hard" :smileysurprised:



I have a case where picklist field value has to be selected, or user must fill in a custom text field. In other words, whether the picklist field or the text field is required.

 

I have already a validation rule running on these same fields saying that user may only choose one of them (if the picklist is selected, the text field may not include text), but I still need to make sure that one of them is required. Is it possible to do this with single validation rule?

 

This is the current validation rule

AND(
NOT(ISBLANK(TEXT(picklist__c ))),
NOT(ISBLANK(Text_Field__c)))

 

Regards,

TP

Hey, how can I do this:

If one picklist field has value (any other than "none"), the other picklist field may not be selected (must be "none")?

Do  anyone have a solution for this? I've tried to reach to solution by using AND and OR statements (with ISPICKVAL), but I have been more or less validating the field to be required if the other field has been selected. So right now I'm doing it in the wrong way.

 

Regards,

TP

Hi,

Am unable to refresh any of the resources in the IDE from the server.

When am trying to refresh a page from the web, getting an Exception saying:

 

 

Unable to refresh resource 'MileaeExension.cls':
com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Unable to refresh resource 'MileaeExension.cls':


com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Please assist to rectify the issue. 

 

Thanks in advance,

VNath

Hi there,

is it possible to automatically enable self-service portal for a contact? This could be done manually by clicking "enable self-service portal" standard button at the contact record. Could this be done automatically with an apex trigger?

 

 

After a lot of persistence I finally was able to get repeating header and footers when rendering a Visualforce page as a PDF. The key to this is the page2PDF support of CSS3. 

 

Here is the css I came up with:

 

<style type="text/css">

@page {

@top-center {

content: element(header);

}

}

div.header {

padding: 10px;

position: running(header);

}

</style>

 

In the visualforce page I have the header setup as a div with the class name "header" the position running command pulls the content in my div and repeats it at the top of every page. The key for some reason is to put your header and footer divs at the top before you put your content on the page.

 

Here is my page

 

<apex:page renderAs="pdf">

<head>

<style type="text/css" media="print">

@page {

@top-center {

content: element(header);

}

@bottom-left {

  content: element(footer);

}

}

 

div.header {

padding: 10px;

position: running(header);

}

div.footer {

display: block;

padding: 5px;

position: running(footer);

}

 

.pagenumber:before {

content: counter(page);

}

.pagecount:before {

content: counter(pages);

}

</style>

</head>

 

<div class="header">

<div>My Header Text</div>

</div>

 

<div class="footer">

<div>Page <span class="pagenumber"/> of <span class="pagecount"/></div>

</div>

 

<div class="content">

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec nulla turpis. Suspendisse eget risus sit amet lectus ornare varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean nec urna purus, adipiscing accumsan massa. Nullam in justo nulla, sed placerat mauris. In ut nunc eget libero posuere luctus. Donec vulputate sollicitudin ultrices. Nulla facilisi. Mauris in sapien arcu. Phasellus sit amet quam non mi ornare tincidunt ac quis lectus.</p>

</div>

</apex:page>

 

I cut the content text short for the purpose of this post. I am sure it will just take some more playing around.

 

Hope this helps someone avoid some late nights like I spent trying to figure this out. :smileyhappy:

 

 

Message Edited by JohnDS on 03-10-2010 07:34 PM

We have sites implemented, but the Customer Portal URL can still be accessed, and the Customer Portal Login screen is displayed.

1.) how can we disable the Old URL?

2.) If we cannot disable the old URL, how can I disable or customize the forgot password link? We have our own Forgot Password functionality in place but if the user access the Old URL and click on this link, SalesForce sends the password to the user bypassing our Forgot Password mechanism.

 

I've tried to insert a javascript in Login Message in Customer Portal Settings and tried to change the href value of the forgotPassword link. but the element is not yet loaded onload and I can't change the href attribute. Any other ideas?

  • February 01, 2010
  • Like
  • 0

Through trial and error I discovered that placing a graphic on the Customer Portal via Setup>Customize>Customer Portal>Settings [Your Portal] Edit>Look and Feel(section)>Lookup for a HTML Document to include in your Header or Footer you have to do some trickery to display it properly.

 

The major issue is that a graphic will not dynamically resize to the end users screen resolution settings. So, as in my case, I wanted to display a graphic to fill the entire Header section of the Customer Portal.

 

I created my graphic, which happened to be 1440px in width and 100px in height, and uploaded it to SF Documents as a .jpg image. I then created my HTML doc with a simple < img src > tag referencing the unique path of the image with will be something like, https://na6.salesforce.com/servlet/servlet.ImageServer?id=[an id]&oid=[another id]&lastMod=1247154430000.

(In order to get the image path you have to go to Documents and locate the image you want, click on the file to see its details, and then right click over the image and do a "Copy Image Location."

I then uploaded that to SF Documents. I then referenced that HTML document in the Customer Portal Setup as my Header.

 

All looked great, until I changed my browser to display on a screen with a 1024x768 resolution. The graphic displayed so long here that I had to scroll horizontally to see the entire graphic. I tested this with other resolutions and well much dismay.

 

So the Solution: Your either have to use JavaScript in your HTML document to handle the image resizing based on the end users screen resolution or you can use a < div > tag. I chose the latter. Here is the code:

 

<div style="position:relative; width:100%; height:100%; margin:0px; padding:0px; left:0px; right:0px;z-index:1">
<img src="https://na6.salesforce.com/servlet/servlet.ImageServer?id=01580000000rnGN&oid=00D3000000000yM&lastMod=1247154430000" width="100%">
</div>
<div style="z-index:2; position:relative; margin:0px; padding:0px;">
</div>

A caveat on this though. You must create your image to be the width of the largest screen resolution you may encounter. That maybe 1280 or 1440 or even bigger. The above code will allow that image to display correctly on all resolutions settings, dynamically.

 

I have since discovered that the resizing to display on the appropriate end users sreen res settings for even HTML components used on the Customer Portal Homepage layout you will have to use the above code somewhere as well. If you do not your may see your square HTML component change size.

 

 

 

 This is a full screen shot using 1024x768 screen res and notice how the middle section (HTML Homepage Component) gets cut off.

 

Hopefully this above tip will mitigate any pain you have using HTML on your Customer Portal.

Hey everybody,

Could you please give me some advice with this:

We are creating child opportunities (cloning products too) with a custom button. When one of the child opportunities' stage is changed to closed/won, should this "winning" child update its parent opportunity.

Child opportunity has a look-up relationship to its parent.

 

I though that we could use another custom button to do the update with URLFOR code (a lot like the URLFOR we have for cloning the parent opportunity in the beginning). But the problem is that the button actually creates a new opportunity, not updates the "old" one.

 

What do you think, is a trigger the only way to update a parent?

 

Best Regards,

TP

Hey, what do you think... is it possible to validate a field with a s-control (javascript)? I'm now validating SSN field with REGEX, but would like to improve the validation with javascript code.

 

Best Regards,

TP

Hey,

Can you help me out with my Visual Force page;

I have a custom object "Participation" which connects an Account to an other custom object "Lessons". Now I'm trying to collect all the participations of an Account to my VF page. With this page it should be possible to print out the information (date values) when the Account took the lesson. I'm using apex:repeat to iterate through every participation displayed at the Account tab related list. Problem is that with repeat my VF page is full of empty fields. I should be able to display custom field on the VF page only when it has a value. This means that 38 custom fields that my participations object has, should be displayed only ones at my VF page. Account participates only ones to one lesson. 

 

Explained in a complicated way?  :smileyhappy:

Is it possible to use apex repeat with condition to display only values that are not null? Or is there a better way to do this? 

 

This is the code:

 <apex:page showHeader="false" standardController="Account" renderAs="pdf">
<p><b><font face="Arial" color="#000080">Header1</font></b></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr>
    <td width="60%">
    Account Name:&nbsp;<apex:outputText value="{!Account.Name}"/><br/>
    </td>
    <td width="40%"><b><font face="Arial"></font></b><br/>
    </td>
</tr>
</table>
<br/>
<hr/>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table2">
<tr>
  <apex:repeat value="{!Account.Participations__r}" var="osa">  
       <td width="60%">
           <font face="Arial">Header2:<br/>          
              A1:&nbsp;<apex:OutputField value="{!osa.A_1__c}"/><br/>
              A2:&nbsp;<apex:OutputField value="{!osa.A_2__c}"/><br/>
              A3:&nbsp;<apex:OutputField value=" {!osa.A_3__c}"/><br/>
              A4:&nbsp;<apex:OutputField value=" {!osa.A_4__c}"/><br/>
              A5:&nbsp;<apex:OutputField value=" {!osa.A_5__c}"/><br/>            
              A6:&nbsp;<apex:OutputField value="{!osa.A_6__c}"/><br/>
              B1.1:&nbsp;<apex:OutputField value="{!osa.B_1_1__c}"/><br/>
              B1.2:&nbsp;<apex:OutputField value=" {!osa.B_1_2__c}"/><br/>
              B1.3:&nbsp;<apex:OutputField value=" {!osa.B_1_3__c}"/><br/>
              B1.4:&nbsp;<apex:OutputField value=" {!osa.B_1_4__c}"/><br/>             
              B2.1:&nbsp;<apex:OutputField value="{!osa.B_2_1__c}"/><br/>
              B2.2:&nbsp;<apex:OutputField value="{!osa.B_2_2__c}"/><br/>
              B2.3:&nbsp;<apex:OutputField value=" {!osa.B_2_3__c}"/><br/>
              B2.4:&nbsp;<apex:OutputField value=" {!osa.B_2_4__c}"/><br/>
              B2.5:&nbsp;<apex:OutputField value=" {!osa.B_2_5__c}"/><br/>           
              B2.6:&nbsp;<apex:OutputField value="{!osa.B_2_6__c}"/><br/>
              B3.1:&nbsp;<apex:OutputField value="{!osa.B_3_1__c}"/><br/>
              B3.2:&nbsp;<apex:OutputField value=" {!osa.B_3_2__c}"/><br/>
              B3.3:&nbsp;<apex:OutputField value=" {!osa.B_3_3__c}"/><br/>            
            </font>
        </td>
        <td width="40%">
           <font face="Arial">Header2:<br/>          
              B3.4:&nbsp;<apex:OutputField value=" {!osa.B_3_4__c}"/><br/>         
              B3.5:&nbsp;<apex:OutputField value="{!osa.B_3_5__c}"/><br/>
              B3.6:&nbsp;<apex:OutputField value="{!osa.B_3_6__c}"/><br/>            
              B3.7:&nbsp;<apex:OutputField value="{!osa.B_3_7__c}"/><br/>
              B3.8:&nbsp;<apex:OutputField value="{!osa.B_3_8__c}"/><br/>
              B4.1:&nbsp;<apex:OutputField value="{!osa.B_4_1__c}"/><br/>
              B4.2:&nbsp;<apex:OutputField value="{!osa.B_4_2__c}"/><br/>               
              C1:&nbsp;<apex:OutputField value="{!osa.C_1__c}"/><br/>           
              C2:&nbsp;<apex:OutputField value="{!osa.C_2__c}"/><br/>             
              C3:&nbsp;<apex:OutputField value="{!osa.C_3__c}"/><br/>            
              C4:&nbsp;<apex:OutputField value="{!osa.C_4__c}"/><br/>           
              C5:&nbsp;<apex:OutputField value="{!osa.C_5__c}"/><br/>            
              C6:&nbsp;<apex:OutputField value="{!osa.C_6__c}"/><br/>            
              C7:&nbsp;<apex:OutputField value="{!osa.C_7__c}"/><br/>           
              C8:&nbsp;<apex:OutputField value="{!osa.C_8__c}"/><br/>             
              C9:&nbsp;<apex:OutputField value="{!osa.C_9__c}"/><br/>              
              C10:&nbsp;<apex:OutputField value="{!osa.C_10__c}"/><br/>               
              C11:&nbsp;<apex:OutputField value="{!osa.C_11__c}"/><br/>              
              C12:&nbsp;<apex:OutputField value="{!osa.C_12__c}"/><br/>          
             </font>
        </td>
        </apex:repeat>
</tr>  
</table>
<br/>
<hr/>   
</apex:page>

 

Hey, can you please help me with this one:

We have a visual force email template with OpportunityLineItems. If that email is sent from Opportunity tab (standard SF email function with 'select template') everything is working fine. What we now would like to have is a similar email template with a couple of Opportunity fields and Opportunity Product Line Items together with some Contract fields in it. This email will be sent from the Contract tab.

 

This new email template (Contract tab version) is working okay with reference to related Opportunity or Account information like this:

       <td><font face="Arial">
              Description: {!relatedTo.Opportunity__r.Description}<br/> 
              Currency: {!relatedTo.Opportunity__r.CurrencyIsoCode}<br/>                
            </font>
       </td>

 

What would be the right way to have OpportunityLineItems to that email template too? I thought that I would be able to add them via Opportunity__r relationship, but I didn't.

 

Any comments, advice... help?

A few years ago I saw a demo where a customer merged the Lead ID into to append to a URL in an email template. The URL pointed the email recipient to a web to lead form which had the Lead ID pre-populated from the merged Lead ID field contained in the URL. By doing this, the customer was able to send out event registrations to existing Leads and have them register for the event (Campaign) via a web to lead form without needing to provide information which they had previously provided.

 

I can setup the email template to include the merge field, however can't work out how to get the lead ID field on my web to lead form to populate. 

 

I thought the URL should look like this, although this just loads the web to lead form without inserting the Lead ID - http://www.<mywebsite>/html?Lead.Id=<lead record id>

 

Any suggestions?

Message Edited by WERD2 on 03-22-2009 04:36 AM
  • March 22, 2009
  • Like
  • 0

When rendering a page as a PDF the filename of the PDF is the name of the page which is not a good thing. The problem with this is that the name is not unique and can cause confusion with the user.

 

I'm working on a quoting app that renders a quote as a PDF. Some broswers open the PDF embed, others automatically launch your PDF reader, and some prompt you to save or open. The problem is that if opened or saved theses files are all saved as qoute.pdf, qoute[1].pdf, quote[2].pdf, quote[3].pdf. The problem should be obvious.

 

Ideally you should be able to define the name of the generated PDF but I haven't figured out how to do this.

 

Thanks,

Jason

  • February 25, 2009
  • Like
  • 1
I have created 2 fields, end date/time and the start date/time and would like the system to automatically calculate the duration in min so the user doesn't have to enter it themselves.
  • February 25, 2009
  • Like
  • 0
Currently I use an override for my opportunity clone, this line being a subset of it.
 
var redirectURL = "{!UrlFor($Action.Opportunity.Clone,Opportunity.Id,[retURL = $Request.retURL],true)}";
Is there any way I can set it to clone with OpportunityLineItems as well?