• davidjthomson
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 0
    Replies

I'm relatively new to Apex, but have already developed a very complicated app in visualforce/apex.

 

Well, after working with SOQL for the past six months, I'm convinced I'm either still doing something terribly wrong, or SOQL is a bad joke. Please help me understand what I'm missing.

 

I have many objects that all relate to one another through lookup fields, sometimes one to many, others one to one, others many to many.

 

For example, object1 has a lookup to object2. So, if I get object1, and I want to then retrieve other fields in the associated object2, I then have to use soql and Object2 = [select id,name,other_field__c from object2 where id=:obj2id];

 

We do this all over the place in our app, in literally every class.

 

I have basically discovered that in order to use SOQL, I can't use the "where" clause inline in a loop without hitting SOQL limits. So I have completely stopped using the where clause.

 

Instead, I have a utility class where I query from the database once in the beginning (using soql) all of the records for any objects we're going to need, and then I iterate through them using a for loop, and look for the field with the attribute I want. Occasionally we have hit "too many statement" limits using this approach, but it seems like it allows us at least to write a functioning app.

 

It feels rather absurd to do this (and almost like cheating, but moreso doing something outrageously ridiculous from a programming perspective), but we haven't been able to figure any way around this architecture.

 

 

Thanks in advance!

 

David

There is an astonishingly annoying bug. When I try to type code into the PageEditor, <apex:page> (or whatever tag), the popup of potential tags prevents me from hitting the : key. It is so infuriating it's not even funny. Has anyone else noticed this?

 

Thanks,

David

Is there a way to have a close icon in an apex:tab? If not, can someone please recommend the best solution (jquery, yui, for example)?

 

Thanks,

David

Hello,

 

I'm wondering if anyone has experience deploying VisualForce pages related to custom objects that have overridden default buttons and actions such as new, edit, and tab view. It seems that when we have deployed to a new org, none of our custom objects have these overridden actions.

 

The reason why I find this so curious is that it seems like it would have to be possible in order to package up an app and make it available on the AppExchange, for example. Any advice would be greatly appreciated!!

 

David

Hello,

 

I have an app that I'm developing, and I would like to know how I can package up any overridden buttons and views, such as Edit, New, and Tab.

 

Thank you!

David

Hello, I'm trying to migrate a development org where I have a lot of customizations, such as overridden buttons (with visualforce and custom controllers), into a sandbox.

 

It seems that when I use ant to extract all of my custom classes, triggers, objects, when I try to deploy these into a sandbox, it loses a lot of information. The controllers have been stripped of their extensions, none of the buttons/views are overridden, etc.

 

Is there a best-practice for how to do this?

 

Thanks,

David

Is it possible to pre-populate the required "Name" field of a custom object when creating it from a parent object? It doesn't seem to fill in the value from the url parameter &name=David

 

Thanks,

David

Hello,

I have an apparently simple problem that must have been solved before and it's a complete show stopper. I want the search in a lookup dialog to associate other objects to search other fields by default other than the auto-generated id field. I've created a custom object, and I want three different fields from that object to be searched on when returning the object to associate. This *must* be possible in salesforce, and I hope it's easy to accomplish.

Thanks!

David