• crowcoder@gmail.com
  • NEWBIE
  • 25 Points
  • Member since 2012

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

I've just begin with the Force.com platform. Any other reporting tool I've used (SSRS, Access, Crystal, etc) has the ability to group within groups. In the example below, I would want to group by client and show some client data, then show parts they have purchased. Ideally I would show service calls as a level and parts inside that level, but if I can figure out how to do this simpler scenario, I should be good to build heirarchies.

Looking at my mock up, is this possible in the report builder?

 

WilliamsJohn    
 client idaddressphone  
 1234 Oak St. 123-456-9090  
 Part # part Desc.qtyPrice easubtotal
 90-933½'' PVC bushing30.89$2.67
 88-009tfe tape11.39$1.69
 34-001Hammer arrestor146.88$46.39
     $50.75
ClaytonMary    
 client idaddressphone  
 206191 Crooked Brook898-111-2222  
 Part # part Desc.qtyPrice easubtotal
 605441½ pvc sched 40 pipe900.29$26.10
 444-6PVC cement18.99$8.99
     $35.09
      
MichaelsLawrence    
 client idaddressphone  
 454456 Wild Way888-444-5568  
 Part # part Desc.qtyPrice easubtotal
 605441½ pvc sched 40 pipe906.23$560.70
 88-009tfe tape31.39$4.17
     $564.87
      
      

I've built a Flow that creates a new record for a Custom object. I'm setting a variable to the new id in the Flow, but I think my VF page is reading its value at creation, which is null. How do I set a page reference to the new id so I can redirect to the new Dispatch__c object? 

 

Controller:

public class DispatchFlowController {
	
	public Flow.Interview.New_Dispatch_Flow theFlow {get; set;}
		
	public PageReference getNewDispatchRecord(){
		if(theFlow == null)
			return null;
		else
			return new PageReference('/' + theFlow.NewDispatchId);
	}
	
}

 VF Page:

<apex:page Controller="DispatchFlowController" >
<flow:interview name="New_Dispatch_Flow" interview="{!theFlow}" 
	finishLocation="{!NewDispatchRecord}"/>
</apex:page>

 note, if I hard-code the new PageReference to an existing id it does redirect to that object instance, but obviously I don't know what id my new object will have until the end of the Flow.

I'm new to SOQL, not at all new to SQL.

 

My error is - 19:54:07:150 FATAL_ERROR System.QueryException: unexpected token: AND

 

with this query:

SELECT
Id,
Name,
Shipper_Name__c,
Service__c,
Dispatch_Date__c,
Start_Time__c,
End_Time__c
FROM
Dispatch__c
WHERE
Shipper_LastName__c like '%load%'
OR Phone_1__c = 'load'
OR Phone_2__c = 'load'
OR GBL__c = 'load'
OR SIT__c = 'load'
OR SO__c = 'load'
OR REF__c = 'load'
OR BOL__c = 'load'
OR Service__c = 'load'
AND ( Dispatch_Date__c >= 2012-12-17 AND Dispatch_Date__c <= 2012-12-31 )
ORDER BY
Dispatch_Date__c DESC

 

But this works:

SELECT
Id,
Name,
Shipper_Name__c,
Service__c,
Dispatch_Date__c,
Start_Time__c,
End_Time__c
FROM
Dispatch__c
WHERE
 Dispatch_Date__c >= 2012-12-17 AND Dispatch_Date__c <= 2012-12-31 
ORDER BY
Dispatch_Date__c DESC

I've built a Flow that creates a new record for a Custom object. I'm setting a variable to the new id in the Flow, but I think my VF page is reading its value at creation, which is null. How do I set a page reference to the new id so I can redirect to the new Dispatch__c object? 

 

Controller:

public class DispatchFlowController {
	
	public Flow.Interview.New_Dispatch_Flow theFlow {get; set;}
		
	public PageReference getNewDispatchRecord(){
		if(theFlow == null)
			return null;
		else
			return new PageReference('/' + theFlow.NewDispatchId);
	}
	
}

 VF Page:

<apex:page Controller="DispatchFlowController" >
<flow:interview name="New_Dispatch_Flow" interview="{!theFlow}" 
	finishLocation="{!NewDispatchRecord}"/>
</apex:page>

 note, if I hard-code the new PageReference to an existing id it does redirect to that object instance, but obviously I don't know what id my new object will have until the end of the Flow.

I've built a Flow that creates a new record for a Custom object. I'm setting a variable to the new id in the Flow, but I think my VF page is reading its value at creation, which is null. How do I set a page reference to the new id so I can redirect to the new Dispatch__c object? 

 

Controller:

public class DispatchFlowController {
	
	public Flow.Interview.New_Dispatch_Flow theFlow {get; set;}
		
	public PageReference getNewDispatchRecord(){
		if(theFlow == null)
			return null;
		else
			return new PageReference('/' + theFlow.NewDispatchId);
	}
	
}

 VF Page:

<apex:page Controller="DispatchFlowController" >
<flow:interview name="New_Dispatch_Flow" interview="{!theFlow}" 
	finishLocation="{!NewDispatchRecord}"/>
</apex:page>

 note, if I hard-code the new PageReference to an existing id it does redirect to that object instance, but obviously I don't know what id my new object will have until the end of the Flow.