• Ken Koellner
  • NEWBIE
  • 395 Points
  • Member since 2010
  • Lead Solutions Architect
  • HMH

  • Chatter
    Feed
  • 8
    Best Answers
  • 27
    Likes Received
  • 0
    Likes Given
  • 224
    Questions
  • 267
    Replies
We'd like to check if about 200 fields are referenced anywhere in code-- Apex, VF, workflows, trigger.  Text searches really don't cut it as you could have a field such as MyCustomField__c in more than one object.  So without doing the same symbol-table work a compiler would do, with references like myObj1.MyCustomField__c and myObj2.MyCustomField__c you would not know the objec type.

I thought of a way to do it via validation but it does not appear to be working.  The idea I had is --

create a package.xml with no types.
create a destructiveChanges.xml with CustomField entries for the custom fields.

But one the descructiveChanges.xml field has one field I know is reference and a I run a validation with the ant deployment tool, I get a successful validation.

Anyone know why the validation could succeed even with a reference to the field in Apex?

Anyone know any other method that is 100% realiable and understands the object and field name together (no simple text searches)?

 
So are start doing some beginner trailheads and try a challenge but it won't let me use my dev org as it has a namespace (I was messing around with Lighning components a while back).  So it lets me create a new hands-on org curious-racoon ...  I do some beginning trailheads in that org.  Then I do a Lightning Trailhead and it says to create a namespace so I do.  The challenges in that Trailhead work fine.  Then I go back to a beginner Trailhead and do a simple challenge to create two custom fields.  The check fails.  I strongly suspect it's because it's looking for a field with an API name Description__c but my field has an API Name, myNameSpace_Description__c.

Is there a way to have a hands-on org that's compatible with all Trailhead Modules?
I have some rest service written in custom Apex.  Anyone know if there's a way to generate a WADL file from them?
When I create a new Eclipse projects where I only want to work on a few modules, it still brings in everything in everything Referenced Packages.  That's over 4600 items for our org.  So it takes five to ten minutes just to create a new Eclipse project and loads up the workspace with a huge amount of stuff I don't need.

Is there anyway to get the Eclipse IDE to not load the stuff in Referenced Packages?
I've used apex-lang a bunch but can't find online any easy to read reference manual.  Anyone know where to find it.  Search for 15 minutes with no luck.

I want to call an action method in a VF controller and have it return a PageReference that the user goes to (it's actually null, I'm going back to the same page) just like an apex:commandLink.  But, I need to do it onChange of a selectOption.  I'm using an actionFunction that does a rerender but it doesn't function the same as a page reload because of complex script and styles on the page.

So what I really want to do is the equivent of using apex:commandLink to call an actionMethod and go to the Page Reference returned but trigger it from onChange of a selectOption?

Anyone know how to do that?  Basically load a new page based on a PageReference from an onChange rather than a rerender?
 

W

Doing a fast validation with selective test execution.  I'm getting too low a % on one module.  I really need to see which lines are covered (the red/blue highlighting you get if you click after you run a test with dev console and click on a module.)  But since this is a validation and it is a new module, I obviously can't use Test feature in Dev Console as the code in the package is different than what's currently in the org.

Anyone know if there's a way to view lines covered after a validation?
Does anyone know if there's a way to get the parent fields for the Account parent object via the ObjectId relationship in ObjectTerritory2Association?

The query below works to get the Name.  But I don't know of a way to get the other fields.  It's actually one custom field that I'm hoping to get in my query.

select ObjectId , Object.Name,  Territory2.MarketUser_Last_Modified_Date__c ,LastModifiedDate
from ObjectTerritory2Association
where   Object.Type = 'Account' limit 10
I've started dabling in Lightning Components and worked through a tutorial last year and have done one of the trailheads a few days.  So I know how to code basic Lightning components and apps.  And I see in the metadata that these become AuraDefinitionBundles.  I also so an example of some code where a bit of JS is added to an empty VF page and that always a Lightning Component to be spun up inside a VF page.

What I want to do is take an exist VF page that is exposed to the internet as a SF "Sites" application and port it to Lightning.  What I included in the prior paragaph leads me to believe the page is codable.  Here's what I don't know.  When a Sites application is configured, you have to tell it what it has access to-- VF pages, Apex controllers, objects and fields, etc.  I don't know how you would give it access to the Aura bundle.  (Unless it's totally implicit and you don't have to and it automatically gets acces.)

Can anyone address the question of how to configure and deploy Sites application that includes a VF page that spins up an Lightning Component?
 

 

A client of one of our web service written in Apex reported an error.  It turns out there was an error --

 

Insert failed. First exception on row 9; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusie access to this record: []

 

I'm trying to think of what would cause an lock problem on an insert.  The method does to a start transaction and then inserts a row in Opportunity and then several in OpportunityLineItem. 

 

I don't see how the problem could be with the row being inserted.  Could it be with something locked a parent record like account?  Could something have already read the Opportunity record while the OpportunityLineItem records where being written?

 

I found out that I can render pages inside IE as if it were chrome rendering the page. http://code.google.com/chrome/chromeframe/ I just need to set this in my <meta http-equiv="X-UA-Compatible" content="chrome=1" /> But I can't seem to be able to get the <meta /> tag inside of without turning off the salesforce header. I want to do this: <meta http-equiv="X-UA-Compatible" content="chrome=1" />