• Joli
  • NEWBIE
  • 50 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I am trying to set up a shipping fulfillment page that lists opportunities and the products that need to be shipped underneath.  The problem is the list will grow very long if the pageBlockSections (one for each opportunity) cannot be collapsed.  When I use a repeat tag to list the opportunity as pageBlockSections with the products for the opportunity listed inside the pageBlockSection the collapse function throws a javascript error.  Everything looks fine, but the pageBlockSection cannot be collapsed.  Here is the VF code:

 

<apex:page standardController="Promotion_Registration_Premium__c" extensions="premiumFulfillmentControllerExt"> <div style="color:red;font-weight:bold;"><apex:messages /></div> <apex:pageBlock title="Premium Fulfillment"> <apex:repeat value="{!premiums}" var="premium" id="theRepeat"> <apex:pageBlockSection id="section" title="{!premium.opportunityName}" columns="1"> <apex:form > <apex:pageBlockSectionItem > <table width="100%" cellpadding="5"> <tr> <td width="15%" style="vertical-align:middle"> <div align="right"><strong>Ship To Name:</strong> </div> </td> <td width="35%" style="vertical-align:middle"> {!premium.shipToName} </td> <td width="15%" style="vertical-align:middle"> <div align="right"><strong>Ship To Address: </strong></div> </td> <td width="35%" style="vertical-align:middle"> {!premium.shipToAddress}<br/>{!premium.shipToCity}, &nbsp; {!premium.shipToState} &nbsp; {!premium.shipToPostalCode} <br/> {!premium.shipToCountry} </td> </tr> </table> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:dataTable value="{!premium.premiums}" var="prp" width="100%" id="premiumTable"> <apex:column width="25%" headerValue="Product" ><apex:outputField value="{!prp.Product__c}"/></apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="right">Quantity Ordered</div></apex:facet> <div align="right"><apex:outputField value="{!prp.Quantity__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="center">Shipped Via</div></apex:facet> <div align="center"><apex:inputField value="{!prp.Shipped_Via__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="center">Tracking Number</div></apex:facet> <div align="center"><apex:inputField value="{!prp.Tracking_Number__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="right">Quantity Shipped</div></apex:facet> <div align="right"><apex:inputField value="{!prp.Quantity_Shipped__c}"/></div> </apex:column> <apex:column width="15%"> <div align="center"> <apex:commandLink value="Mark as Shipped" action="{!markItemAsShipped}"> <apex:param name="premId" value="{!prp.Id}"/> </apex:commandLink> </div> </apex:column> </apex:dataTable> </apex:pageBlockSectionItem> </apex:form> </apex:pageBlockSection> </apex:repeat> </apex:pageBlock> </apex:page>

 

Thanks in advance for any help.

  • September 16, 2009
  • Like
  • 0

Hi all,

 

Apologies in advance if I've used some incorrect terminology here...this is my first foray into programming in about ten years.

 

I am trying to make a visualforce page that shows a combination of comments and emails for a particular Case in chronological order.

Using the sample code for Case History Timeline, I added some code that pulls the list of EmailMessages as well as what's already there.

 

The body of each Comment and Email is natively a textarea, but the history object populates then into a String (public string to), and I lose all of the formatting:

 

 

 

public class history {

    /* Properties of the class */
    public datetime historydt { get; private set; }
    public boolean ispublic   { get; private set; }
    public string actorname   { get; private set; }
    public string historyType { get; private set; }
    public string to          { get; private set; }
    public string fr          { get; private set; }

 

for (CaseComment comment:c.casecomments) { 
            if (!hidePrivate || comment.ispublished) {
                addHistory(histories, new history(comment.createdDate, comment.ispublished, comment.createdby.name, 'Comment Added', '' , truncateValue(comment.commentbody))); 
            }
        }

 

 

I tried updating the history class so that  "to" was defined as a textarea, but I got an error:

 

Error: Compile Error: Invalid type: textarea

 

I would be grateful for any advice or pointers!

 

thanks so much

  • July 07, 2010
  • Like
  • 0

I'm trying to create a worfklow rule using the criteria below

 

 

 

 

I want to send an email to the account owner as soon as the status of the "orders blocked"-picklist field is set to "Yes" and the previous value was equal to "No" or "Yes/No".

 

I thought this was an easy one but apparantly this kind of formula is not possible in Salesforce?

Can anybody explain me why not, and how to formulate this criteria rule so that it doesn't give an error message?

 

 

Thanks in advance.

Hi all,

 

Apologies in advance if I've used some incorrect terminology here...this is my first foray into programming in about ten years.

 

I am trying to make a visualforce page that shows a combination of comments and emails for a particular Case in chronological order.

Using the sample code for Case History Timeline, I added some code that pulls the list of EmailMessages as well as what's already there.

 

The body of each Comment and Email is natively a textarea, but the history object populates then into a String (public string to), and I lose all of the formatting:

 

 

 

public class history {

    /* Properties of the class */
    public datetime historydt { get; private set; }
    public boolean ispublic   { get; private set; }
    public string actorname   { get; private set; }
    public string historyType { get; private set; }
    public string to          { get; private set; }
    public string fr          { get; private set; }

 

for (CaseComment comment:c.casecomments) { 
            if (!hidePrivate || comment.ispublished) {
                addHistory(histories, new history(comment.createdDate, comment.ispublished, comment.createdby.name, 'Comment Added', '' , truncateValue(comment.commentbody))); 
            }
        }

 

 

I tried updating the history class so that  "to" was defined as a textarea, but I got an error:

 

Error: Compile Error: Invalid type: textarea

 

I would be grateful for any advice or pointers!

 

thanks so much

  • July 07, 2010
  • Like
  • 0

Compared to other parts of the world, the APEX and Visualforce community in APAC is relatively non-existent.

I am very keen to start some kind of beginners community for Australia and surrounds that allows 'noobs' connect with each other and learn from each other.

 

The whole is greater than the sum of it's parts - or so they say. Lets test the theory!

 

Let me know if this is something you might be interested in getting involved with and, if demand exists, we can get this thing started.

 

Matt

matt@prmaustralia.com.au

  • April 06, 2010
  • Like
  • 0

I am trying to set up a shipping fulfillment page that lists opportunities and the products that need to be shipped underneath.  The problem is the list will grow very long if the pageBlockSections (one for each opportunity) cannot be collapsed.  When I use a repeat tag to list the opportunity as pageBlockSections with the products for the opportunity listed inside the pageBlockSection the collapse function throws a javascript error.  Everything looks fine, but the pageBlockSection cannot be collapsed.  Here is the VF code:

 

<apex:page standardController="Promotion_Registration_Premium__c" extensions="premiumFulfillmentControllerExt"> <div style="color:red;font-weight:bold;"><apex:messages /></div> <apex:pageBlock title="Premium Fulfillment"> <apex:repeat value="{!premiums}" var="premium" id="theRepeat"> <apex:pageBlockSection id="section" title="{!premium.opportunityName}" columns="1"> <apex:form > <apex:pageBlockSectionItem > <table width="100%" cellpadding="5"> <tr> <td width="15%" style="vertical-align:middle"> <div align="right"><strong>Ship To Name:</strong> </div> </td> <td width="35%" style="vertical-align:middle"> {!premium.shipToName} </td> <td width="15%" style="vertical-align:middle"> <div align="right"><strong>Ship To Address: </strong></div> </td> <td width="35%" style="vertical-align:middle"> {!premium.shipToAddress}<br/>{!premium.shipToCity}, &nbsp; {!premium.shipToState} &nbsp; {!premium.shipToPostalCode} <br/> {!premium.shipToCountry} </td> </tr> </table> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:dataTable value="{!premium.premiums}" var="prp" width="100%" id="premiumTable"> <apex:column width="25%" headerValue="Product" ><apex:outputField value="{!prp.Product__c}"/></apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="right">Quantity Ordered</div></apex:facet> <div align="right"><apex:outputField value="{!prp.Quantity__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="center">Shipped Via</div></apex:facet> <div align="center"><apex:inputField value="{!prp.Shipped_Via__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="center">Tracking Number</div></apex:facet> <div align="center"><apex:inputField value="{!prp.Tracking_Number__c}"/></div> </apex:column> <apex:column width="15%"> <apex:facet name="header"><div align="right">Quantity Shipped</div></apex:facet> <div align="right"><apex:inputField value="{!prp.Quantity_Shipped__c}"/></div> </apex:column> <apex:column width="15%"> <div align="center"> <apex:commandLink value="Mark as Shipped" action="{!markItemAsShipped}"> <apex:param name="premId" value="{!prp.Id}"/> </apex:commandLink> </div> </apex:column> </apex:dataTable> </apex:pageBlockSectionItem> </apex:form> </apex:pageBlockSection> </apex:repeat> </apex:pageBlock> </apex:page>

 

Thanks in advance for any help.

  • September 16, 2009
  • Like
  • 0