• jjulian
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
  • 4

Is it a platform? A module of the entire salesforce.com application? Is it metadata? Is it something that I see when I log into our org? 

I'm sorry but this is just ridiculous. I've always used the Database class and now all of a sudden it's throwing an error! 


I get the same error even when I'm in developer mode.



The class's API is 24.0, but I don't think that's the problem since I've switched it 25 and back.

  • September 10, 2012
  • Like
  • 0

I have the following SOQL statement:


    fiscal_quarter(olis.ScheduleDate) fquarter, sum(olis.Revenue) revenue
    OpportunityLineItemSchedule olis
    olis.ScheduleDate = THIS_FISCAL_YEAR
group by 

 which returns the aggregated revenue amount, grouped into fiscal quarters, of all opportunities with a scheduleDate that falls in the current fiscal year.


Unfortunately, I've realized that this query does not include amounts from opportunities without a schedule information (ie., opps without oppLineItemSchedules children). 


To provide a contrast with SF reports, if you have a report of report type, Opportunities with Products and Schedules (out of the box report type), grouped by fiscal quarter, the amounts from all opportunities are grouped into fiscal quarters based on two observed conditions:

  • Amounts from opps with schedule info are allocated to fiscal quarters according to  oppLineItemSchedule.ScheduleDate.
  • Conversely, amounts from Opps without schedule info are allocated to fiscal quarters based on Opportunity.CloseDate

My SOQL statement above currently cannot achieve the second condition. How can I modify it to do so?


From within my apex controller, how do set PageReference to redirect to an object's list view page?


The only documented way of doing this is through visualforce:


<apex:page action="{!URLFOR($Action.Account.List, $ObjectType.Account)}"/>

 However, I want to be able to do this from the controller instead:

public PageReference confirm()
	// Do prep data
	PageReference ref = new PageReference();
	// ??? redirect to object's list view

	return ref;


Is it a platform? A module of the entire salesforce.com application? Is it metadata? Is it something that I see when I log into our org? 

Hi all


I thought I could achieve this with a workflow and field update but no :-(  From research it looks like the only choice maybe a trigger? Anyones advice would be appreciated.


This is what I'm trying to do:


An approval process has been setup for Contracts and we only allow one contract to be created per Opportunity. When a Contract is approved in the Approval Process and and the Contract 'Status' pick list field is changed to 'Activated' then I want the 'Stage' pick-list field in that Opportunity to be auto updated/changed to 'Closed Won'.


Almost forgot, the Opportunity Stage value will be 'Closed Won Pending Approval' when the Contract is approved, just in case yuo may be wondering why the Oppotunuty Stage isn't already set at 'Closed Won'


Any ideas? Is a trigger the only way?



If I have a Custom Controller and VisualForce page with a PageBlockTable and InlineEditSupport, what do I need to do to save the changes to multiple records in my PageBlockTable?


I tried 

public PageReference SaveTiers(){
        update tiers;
        return null;

 where tiers is a list<tier__c> and setup() grabs the list of tier__c and fills tiers. THe thing is, I got this working at one point, but after a refresh it quit working and now I can't get it to work at all.


I would post all my code, but it would just confuse more because it is complicated and calls a lot of outside classes. Suffice to say, all I want to know is how would I write a function that saves the changes to a list of records that were changed via the inlineediting ui in a pageblocktable?


I am trying to retrieve the detail records at the same time as the master record. I added a custom field lookup on Opportunity to Account (Contact__c).
 I get this error in Eclipse for the last line of code: "The configuration of your org has changed, please reload the page. Missing dependent object: Field: Opportunity.ContactId".
Could anybody help?
The business scenario that I have is totry to get is the latest Membership_End_Date__c for all Opportunities related to a given Contact.

trigger UpdateIndividualMemberEndDate on Opportunity (after insert) { set<ID> contIDs = new Set<ID>(); if(Trigger.isInsert) { for(Opportunity o : System.Trigger.new){ contIDs.add(o.Contact__c); } Contact[] conts = new List<Contact>(); conts = [select Id, (select Membership_End_Date__c from Opportunities Order by Membership_End_Date__c desc) from Contact where ID in :contIDs]; Map<Id, Opportunity[]> contopp = new Map<Id, Opportunity[]>(); for (Contact eachCont: conts) { contopp.put(eachCont.Id, eachCont.Opportunities);} } }