• Paul Berglund
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
I added a CSS class to an apex:component

<head>
    <style>
     .myclass {
      font-size: large;
     }
    </style>
</head>

And then accessed it

<apex:outputText styleClass="myclass" value="some text" />

And nothing happens.  If I use the style tag, it works.  If I put the definition in the apex:page calling the component, it works.  Very strange!
I'm starting at the 4th level from the bottom and trying to build a territory hiearchy.  What I'm seeing is I need to query the child territories one group at a time by getting the territories where the ParentTerritoryId = the starting territory Id, and doing multiple subqueries for each level below.

4th level territory = select Id, Name from Territory where id = :id;
3rd level territories = select Id, Name from Territory where ParentTerritoryId = 4th level territory id;
Build a map of all the Ids - called 3rd level territory ids
2nd level territories = select Id, Name from Territory where ParentTerritoryId in :3rd level territory ids;
Build a map of all the Ids - called 2nd level territory ids
1st level territories = select Id, Name from Territory where ParentTerritoryId in :2nd level territory ids;

Is there a more efficient way of doing this?
 
on some events there is a channel attribute - but I haven't found any examples of what it is used for or how to use it.  Anyone know?
If I wanted to write my own component to handle text,  would I be able to do call a describe event to get the metadata for the field?  I see this as a way to set the width of the component or the max length that field.  Or is there a way to do this that I'm missing?
Will each page layout become a Lightning App?

Will each field become a Lightning Component?

if so, will each App and Component have a standard set of Events associated with them so we can integrate our custom components?
I would like to create a custom object and then upload PDF attachments to it.  Any one done this?  Is it possible to do that?  I know there isn't a data type for PDF attachments, but I thought I saw an Attachment section on the page created for the custom object.
Will each page layout become a Lightning App?

Will each field become a Lightning Component?

if so, will each App and Component have a standard set of Events associated with them so we can integrate our custom components?

Hi,

 

Can someone let me know what is the URI of the RESTful API for creating a User object on Sales Force?

Thanks in advance.

 

Regards,

Guru

  • September 06, 2011
  • Like
  • 0

The Edit button only appears if the action and method is 'editMe' if they are named 'edit' the button no longer appears.

 

I have different page/class with the same edit method, is that the problem? The edit method needs to be uniquely named?

 

Here is the page:

 

<apex:page standardController="Service_Revnue_Forecast__c" extensions="ServiceForecast" title="Service Forecast" showHeader="true" sidebar="true"> <apex:detail relatedList="false" title="true"/> <apex:form > <apex:pageBlock title="Monthly Service Forecasts" id="gridform"> <apex:pageBlockButtons > <apex:commandButton action="{!saveForecasts}" value="Save" rendered="{!EditFlag}" id="SaveForecastButtonhhh" rerender="gridform" status="status"/> <apex:commandButton action="{!cancelEdit}" value="Cancel" rendered="{!EditFlag}" id="CancelForecastButton" rerender="gridform" status="status"/> <apex:commandButton action="{!editMe}" value="Edit" rendered="{!EditFlag == false}" id="EditForecastButton" rerender="gridform" status="status"/> </apex:pageBlockButtons> <apex:outputPanel id="viewTable" rendered="{!EditFlag == false}"> <apex:dataTable value="{!lForecasts}" var="item" id="ForecastTableView" rowClasses="odd,even" styleClass="" rules="rows" width="100%" > <apex:column headervalue="Forecast Name"><apex:outputLink value="/{!item.Id}" target="_self">{!item.name}</apex:outputLink></apex:column> <apex:column headervalue="Forecast"> <apex:outputField id="Forecast_Amount" value="{!item.Forecast__c}"/> </apex:column> <apex:column headervalue="Actual"> <apex:outputField id="Actual_Amount" value="{!item.Actual__c}"/> </apex:column> <apex:column headervalue="Comments"> <apex:outputText id="Comments" value="{!item.Comments__c}"/> </apex:column> <apex:column headervalue="Date" value="{!item.Date__c}"/> </apex:dataTable> </apex:outputPanel> <apex:outputPanel id="editTable" rendered="{!EditFlag}"> <apex:dataTable value="{!lForecasts}" var="item" id="ForecastTableEdit" rowClasses="odd,even" styleClass="" rules="rows" width="100%" > <apex:column headervalue="Forecast Name"> <apex:inputField id="Name" value="{!item.Name}"/> </apex:column> <apex:column headervalue="Bkgs Fcst Amt"> <apex:inputField id="Forecast_Amount" value="{!item.Forecast__c}"/> </apex:column> <apex:column headervalue="Comments"> <apex:inputText id="Comments" value="{!item.Comments__c}"/> </apex:column> </apex:dataTable> </apex:outputPanel> <apex:actionStatus id="status" startText="Requesting..." stopText="Data Retrieved!"/>&nbsp;{!StatusText} </apex:pageBlock> </apex:form> </apex:page>

 

 Here is the class:

 

public class ServiceForecast { String StatusText; public List<Monthly_Service_Revenue_Forecast__c> lForecasts; public Monthly_Service_Revenue_Forecast__c editForecast {get;set;} Boolean InsertFlag; public Boolean EditFlag {get;set;} private final Service_Revnue_Forecast__c SF; // Constuctor for extending the standard controller public ServiceForecast(ApexPages.StandardController stdController) { this.SF = (Service_Revnue_Forecast__c)stdController.getRecord(); StatusText = ''; lForecasts = ForecastList(); InsertFlag = false; EditFlag=false; } public String getParam(String name) { return ApexPages.currentPage().getParameters().get(name); } // Fill list with Forecasts public List<Monthly_Service_Revenue_Forecast__c> ForecastList(){ List<Monthly_Service_Revenue_Forecast__c> fl; try { fl = [Select c.id, c.Actual__c,c.Forecast__c, c.Date__c,c.Name, c.Comments__c from Monthly_Service_Revenue_Forecast__c c where c.Service_Revenue_Forecast__c = :SF.id]; } catch (QueryException e){ system.debug(e.getMessage()); StatusText = e.getMessage(); } return fl; } // Called from Grid to get List of Forecasts public List<Monthly_Service_Revenue_Forecast__c> getlForecasts () { if (InsertFlag){ lForecasts.add(new Monthly_Service_Revenue_Forecast__c(Service_Revenue_Forecast__c = SF.id)); InsertFlag = false; } return lForecasts; } // Called from Page to pass values from grid to controller public void setlForecasts(List<Monthly_Service_Revenue_Forecast__c> mf) { lForecasts = mf; } // Called from Page to get StatusText public String getStatusText() { return StatusText; } // Called from "Save" Button public PageReference saveForecasts () { try { upsert lForecasts; } catch (DMLException e) { system.debug(e.getMessage()); StatusText = e.getMessage(); } lForecasts = ForecastList(); EditFlag=false; return null; } // Called from "Add" Button public PageReference addForecast () { InsertFlag = true; return null; } public PageReference cancelEdit(){ EditFlag = false; return null; } public PageReference saveEdit() { try { UPDATE editForecast; editForecast = null; } catch (Exception e) { ApexPages.addMessages(e); } return null; } public PageReference editMe() { EditFlag = true; return null; } }

 

 Got it to work, just checking for my own edification.

 

thanks,

 

lee