• MicahHoover.ax1233
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I have a trigger that converts one record into a BUNCH of other records depending on the length of time between two date fields. If the dates are long (like 20 months) and there are 150 of them I hit 3 governor limits (script lines, DML, and query).

 

Several experts have looked over the code with me and the margin for optimization is low, and I'm thinking about the alternatives right now (please feel free to comment as to how much value you see these paths having or if I am leaving out any good ones):

 

1) Have the DB guy only load these records with long dates 20 or 30 at a time. (Q: How long does he need to wait before SF puts them into separate trigger calls?)

 

2) Get rid of the trigger entirely and have a workflow rule that checks a flag on each incoming record to see if it has been processed yet and handle them until the governor limits get close. (Q: How nasty of a hack is this in SF land?)

 

3) Drop SF for heroku, ec2, azure, etc.

Say my schema looks like this:

 

ChildObject -> ParentObject -> GrandpaObject

 

And there is a field GrandpaObject__c.operational_area__c I want associated with my ChildObject.

 

I want to be able to grab all the ChildObjects from a batch in one big query but still have access to the field in the GrandpaObject for each ChildObject.

 

I'm guessing I use a child-parent relationship somehow, but I haven't seen any examples like that.

 

Does anyone have any idea?

We are currently using Apex controllers, Visualforce, jQuery, etc. to do some custom report pages on force.com.

 

My company wants to know what we can do "out of the box" without these technologies.

 

I am confident I can do the dashboard thing, but they also want tables and links that can take users to drill down pages. Is there anyway to facilitate this using click/declarative techniques?

 

Thanks!

 

 

Micah

So I'm a new guy who's had a lot of success with JS remoting. It seems very simple (moreso than AJAX stuff on other platforms).

 

Since it is new, I was wondering if it was intended to replace partial page updates or if the two are intended to serve slightly different purposes.

 

Before I put the time into learning a new AJAX flavor, I wanted to see if it was going to be around a while.

 

 

Micah

I have a trigger that converts one record into a BUNCH of other records depending on the length of time between two date fields. If the dates are long (like 20 months) and there are 150 of them I hit 3 governor limits (script lines, DML, and query).

 

Several experts have looked over the code with me and the margin for optimization is low, and I'm thinking about the alternatives right now (please feel free to comment as to how much value you see these paths having or if I am leaving out any good ones):

 

1) Have the DB guy only load these records with long dates 20 or 30 at a time. (Q: How long does he need to wait before SF puts them into separate trigger calls?)

 

2) Get rid of the trigger entirely and have a workflow rule that checks a flag on each incoming record to see if it has been processed yet and handle them until the governor limits get close. (Q: How nasty of a hack is this in SF land?)

 

3) Drop SF for heroku, ec2, azure, etc.

We are currently using Apex controllers, Visualforce, jQuery, etc. to do some custom report pages on force.com.

 

My company wants to know what we can do "out of the box" without these technologies.

 

I am confident I can do the dashboard thing, but they also want tables and links that can take users to drill down pages. Is there anyway to facilitate this using click/declarative techniques?

 

Thanks!

 

 

Micah

I'm trying to call an external web service from Apex.

The web service call returns an array of objects. So the generated Apex definition for the call is something like:

public class testWsdl {

    public class CalculationPort {

        public testWsdl.ComputedType[] calculate(DateTime start,DateTime end_x,DateTime now)
        ...

When I invoke it, I use the following code (declarations omitted for clarity):

  testWsdl.CalculationPort stub = new testWsdl.CalculationPort();
  testWsdl.ComputedType[] results = stub.calculate( start, end_x, now);

I get the following error on the second line:
  Non-void method might not return a value

I have no idea what this means. I've also tried the following code:
  testWsdl.ComputedType[] results = testWsdl.ComputedType[0];
  results = stub.calculate( start, end_x, now);

And I get exactly the same error.

I think I understand what the error means, that the variable results may be null after the call has completed.

My question is, how do I get rid of the error?