- Ken Koellner
- NEWBIE
- 395 Points
- Member since 2010
- Lead Solutions Architect
- HMH
-
ChatterFeed
-
8Best Answers
-
27Likes Received
-
0Likes Given
-
224Questions
-
267Replies
Lightning components and files in package.xml
- Amarjeet Chawla
- November 07, 2014
- Like
- 1
- Continue reading or reply
Is posible to add "help text" in a field if I'm using a controller?
Hi, I'm creating a VF page, and I need to add "help text" in a fields, but I'm not using standarcontroller, what can I do?
Please Help!
- N@ypers
- February 10, 2012
- Like
- 0
- Continue reading or reply
Creating a datetime instance using a specific time zone
Hello,
I need to create records to check the SLA on our daily batch operations. The SLAs times are stored in its own object using a string to indicate HH:MM and a picklist value to specify the timezone for the client. Each day I need to generate the expected SLA record based on the date and the time stored in SLA times object to compare against the actual. Ideally, I should be able to create a datetime instance specifying the relevant time zone. However, the only options avaialble in Apex are GMT or current user locale.
Is there a way to accomplish the same using what's available in Apex?
I could store the time offset from our default time zone (EST) in the SLA object. However, I would need to deal with the periods when Europe and North America switch daylights savings at different dates.
Thanks,
Pedro
- PedroL
- October 25, 2011
- Like
- 0
- Continue reading or reply
Basic SOQL - Relationships instead of Joins:?
I know my question is going to be pretty simple for you veterans but can someone explain to me how relationships work in SOQL. I have looked at the documentation and the discussion boards but can not seem to understand it.
I want to get the following fields from the following tables:
Contact.FirstName,
Contact.LastName,
Account.Name,
Opportunity.Name
I have tried the following but it does not seem to work:
SELECT Contact__c.FirstName, Contact__c.LastName, Contact__c.Account__r.Name, Contact__c.Account__r.Opportunity__c.Name From Contact
The more I read the more confused I get.
I need to understand the basic concept. If someone could help I would appreciate it.
Robert
- RD7408
- October 21, 2011
- Like
- 0
- Continue reading or reply
How to tell if a field is references in Apex
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)?
- Ken Koellner
- April 19, 2017
- Like
- 0
- Continue reading or reply
namespace hands-on org
Is there a way to have a hands-on org that's compatible with all Trailhead Modules?
- Ken Koellner
- April 11, 2017
- Like
- 0
- Continue reading or reply
Source Control policy for developers working in the same sandbox
- develope with a team of at least 1/2 dozen developers.
- Have a large org with lots of code and complex data that must be setup before any real work can be done.
- Use a single development sandbox for all developers.
- Use a source control for code.
Has anyone solved this problem and devised a strategy for using source control when multiple users are working in the same sandbox?
- Ken Koellner
- March 02, 2017
- Like
- 0
- Continue reading or reply
Is there a way to generate WADL from an Apex REST Service?
- Ken Koellner
- January 19, 2017
- Like
- 0
- Continue reading or reply
Apex Test Method error re Data Silo Test using Platform Cache
I have other tests classes that make use of other functional classes that will use my cache wrapper class. Those tests fail with message --
caused by: cache.Org.OrgCacheException: Failed Cache.Org.contains() for key 'local.CommonConstants.namesToIdMapMap': Org cache is only supported in Data Silo testsI did some search and can't find anything specific in the manual about testing classes that use Platform Cache and can't find anything on "Data Silo" tests.
I'm guessing some kind of mixing of data operations isn't allow and maybe you can only test Platform Cache when certain other operations do not take place. But I can't find rules documented anywhere.
I'm guessing I can workaround by putting a hook in to only use the cache when isRunningTest() is true if the cache wrapper class is called by the one test specific to it that doesn't do any other data work. But I hate to guess and have my test class come crumbling down in the future from some restriction I do not understand.
Anyone have any ideas?
- Ken Koellner
- January 06, 2017
- Like
- 0
- Continue reading or reply
Anyone know of any issue with destructiveChanges.xml and scheduled apex on a queueable?
I'm wondering if there is some restriction I do not know about or if SF is acting up. I'm not sure I want to take the time to run this issue by Tech Support.
BUILD FAILED /hmco_dev/SFDC/deploy/feature/IN25014_Rel31.4_ReleaseXYZ/build.xml:41: *********** DEPLOYMENT FAILED *********** Request ID: 0Afg000000fGqHjCAK All Component Failures: 1. classes/DoWOrkCalculatorQueueable.cls -- Error: This Schedulable class is in use. : Apex Class. *********** DEPLOYMENT FAILED ***********
- Ken Koellner
- December 23, 2016
- Like
- 0
- Continue reading or reply
Is there anyway to keep the Eclipse IDE from included Referenced Packages?
Is there anyway to get the Eclipse IDE to not load the stuff in Referenced Packages?
- Ken Koellner
- December 19, 2016
- Like
- 0
- Continue reading or reply
where is documentation for apex-lang?
- Ken Koellner
- December 09, 2016
- Like
- 0
- Continue reading or reply
I need to put a meta tag inside the <head> </head> area of a VF page.
If I just include meta tag I need -- <meta name="viewport" content="width=device-width, initial-scale=1.0"/> after the <apex:page .../> tag, it comes out in the body when VF renders the page. Even with standard styles off.
- Ken Koellner
- July 13, 2016
- Like
- 0
- Continue reading or reply
ActionFunction takes user to PageReference
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
- Ken Koellner
- June 21, 2016
- Like
- 0
- Continue reading or reply
Any way to tell which record is denied on an Insufficient Privileges error.
You do not have the level of access necessary to perform the operation you requested....." error.
Is there any way to tell what record it is complaining about? I get one log and it does a bunch of stuff including a bunch of SOQL queries and I do not see any errors in it.
- Ken Koellner
- June 09, 2016
- Like
- 0
- Continue reading or reply
Browser History and Null PageReferences returning to same back re back button
I've noticed three different behaviors--
- The browser Back button is enabled and if the user hits it, they goes to the page in the prior View State.
- The Back button is not enabled.
- The Back is enabled but if I hit it I get the error "Document Expired This document is no longer available."
- Ken Koellner
- June 08, 2016
- Like
- 0
- Continue reading or reply
View Lines of Code Coverage on result of Fast Validation
Anyone know if there's a way to view lines covered after a validation?
- Ken Koellner
- June 07, 2016
- Like
- 0
- Continue reading or reply
Any way to view code coverage in Setup as opposed to Dev Console?
I see the coverage stats in the lower left and I really want to copy them and put them in an email. But there's no way to copy-and-paste. It seems inane that I'd have to re-key that stuff.
Does anyone know if you can still get the coverage % by module, and even better the blue/red line coverage in the good old HTTP web page setup pages?
- Ken Koellner
- April 21, 2016
- Like
- 0
- Continue reading or reply
SOQL Query parent fields via objectId 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
- Ken Koellner
- April 17, 2016
- Like
- 0
- Continue reading or reply
When are release notes for Summer 16 available
Anyone know where the feature list is?
- Ken Koellner
- April 15, 2016
- Like
- 0
- Continue reading or reply
Any way to get a DML to commit and then rethrow an Exception and not lose the DML?
Here's a test sequence I did but the insert is always rolled back.
Class MyException extends Exception { } Exception myEx; try { throw new MyException ('force fail'); } Catch (exception ex) { myEx = ex; } if (myex != null) { MyLogRecord__c logRecord = new MyLogRecord__c(); logRecord.message = 'test message'; insert logRecord; savepoint beforeDML = null; beforeDML = Database.setSavepoint(); database.rollback(beforeDML); throw myex; }
- Ken Koellner
- March 25, 2016
- Like
- 0
- Continue reading or reply
Single-page app Lightning inteface is inferior to good ol' URLs in a lot of situations.
But for navigation, I think good ol' URLs fetching a new page is just better, better, better, better.
For Setup, I think Lightning is going to make our lives as developers much much harder and I wish SF would abandon the effort. In the good ol' days of most of setup, you get a nice page with the create and modification dates and users. So if something in a trigger breaks, you can check who developed it last, then you can grab the URL and mail it to the developer.
Try that with process builder. You get a mod date and that's it. You don't get a name of the last modification and you don't get a URL. If a trigger breaks, you can email the URL. If a process breaks, you can't email a URL.
Yeah, Lightning looks pretty. But I sure hope all of setup never never never migrates to Lightning.
- Ken Koellner
- February 23, 2016
- Like
- 0
- Continue reading or reply
Add lightning app to visualforce page in winter '16 sandbox.
I'm trying to get this to work. My SB in on Winter '16. I'm getting a 404 on my aura component (I have firebug on my browser) in the firebug console.
This is KKTestApp1.app --
<aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="ui:button"/> </aura:application>This is KKTestLightningContainer.vfp --
<apex:page> <apex:includeLightning /> This is a test. <div id="lightning" /> <script> $Lightning.use("hmhco:KKTestApp1", function() { $Lightning.createComponent("ui:button", { label : "Press Me!" }, "lightning", function(cmp) { // do some stuff }); }); </script> </apex:page>
I tried including our domain "hmhco:KKTestApp1", leaving it out "KKTestApp1", and just "c" as in the example "c:KKTestApp1".
I'm my firebug console, I get 404 error on the URL --
https://hmhco--sb2.cs42.my.salesforce.com/hmhco/KKTestApp1.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT
or --
https://hmhco--sb2.cs42.my.salesforce.com/c/KKTestApp1.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT"
or --
https://hmhco--sb2.cs42.my.salesforce.com/KKTestApp1/undefined.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT"
Maybe I need a different prefix.
Maybe there is some global setting to turn something on and make it available.
I'm working for these instructions -- https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
There's no additional info on anything that has to be done.
- Ken Koellner
- December 12, 2015
- Like
- 0
- Continue reading or reply
Include Lightning Component in Sites VisualForce 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?
- Ken Koellner
- October 16, 2015
- Like
- 2
- Continue reading or reply
Include Lightning Component in Sites VisualForce 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?
- Ken Koellner
- October 16, 2015
- Like
- 2
- Continue reading or reply
Lightning and VF, Lightning and Aloha: Two things I need to know/learn.
Here are what I consider the two BIG questions that everyone is going to want to know--
Our orgs has dozens and dozens of VF pages, typically launched from buttons or links on page layouts. We'd like to turn on Lightning Experience to get the new UI but can't rewrite all that legacy code at once in Lightning Components. Can we from Lightning Experience still launch all those VF pages and will they still work? If so, how?
We are not ready to turn on Lightning Experience but we are continueing to do new development. We'd prefer to write our new featues as Lightning Components/Apps (not simply as VF with the Lightning styles). If we leave the legacy Aloha GUI on, could we launch and execute Lightning apps and return to the regular desktop on completion? If so, how?
If anyone has can concrete into in either area and can offer insight, please follow up on this thread.
- Ken Koellner
- September 22, 2015
- Like
- 1
- Continue reading or reply
Don't like new online Apex Manual
Also te scrolling area on the left is only a couple lines.
At least in the version of Firefox I'm suing ESR 31.6.0 the rendering is all messed up with text on top of it.
For a learning manual, the new manual might be okay but it really isn't as efficient as the old one when you have to really quickly look up one little detail.
- Ken Koellner
- June 08, 2015
- Like
- 1
- Continue reading or reply
Standard SF Styles on VF Page in Spring '15 on SF1
Now one of our sandboxes is on Spring '15 and when I look at the page in SF1 in that sandbox (from SF1 on iPad or from Chrome on a PC via one/one.app) the page rendering is all messed up.
I looks to me like all the standard SF style for things like Page Blocks are missing. Fonts are serif and page is gray and block and section borders are missing.
I'm wondering if something changed in SPring '15 and may I have to add code to get the standard SF styles in my page.
Anyone notice this behavior and have a fix?
(I want to enter a Support Case but that means typing up full instruction for reproducing the case and explaining it to them and I won't have time to do that for a day or two.)
- Ken Koellner
- February 12, 2015
- Like
- 1
- Continue reading or reply
Locks held on Insert to Opportunity and OpportunityLineItem
When I start doing the create Opportunities concurrently, I'm worried about locking errors. The main resource shared by all Opps is Account. If the first transaction write-locks Account then the others will likely fail with locking errors. There's also the issue of PricebookEntry and Product as many of the Opps will be using similiar lists of Products.
Anyone know what locks will be held when the inserts are happening to Opp and Opp Line Item and what the likelihood of interference is?
- Ken Koellner
- February 03, 2015
- Like
- 1
- Continue reading or reply
Remove New button on the Mobile (SF1) layout for related list.
In the layout in question, the New button as been disabled on the layout. So in the regular (aloha) interface, there's no New button on the related list.
On Account, I get New Task, New Case, New Opportunity, etc. But I don't want "New Opportunity". None of those buttons are listed in the action list on the page layout definition so I don't know how they are editable.
I don't want the New Opportunity button on Account in SF1 but I'm getting it.
Is there a different way to remove the New button for a related list on the mobile / sf1 interface?
- Ken Koellner
- December 16, 2014
- Like
- 1
- Continue reading or reply
IDE and Deployment (yeah, I know I'm getting ahead of myself.)
I don't see anything in the 31.0 meta-data selector for Lightning components but it seems to me the IDE and metadata tools have always come a few months late.
Anyone know if/when the IDE and ant migraition tool will support retreive and deploying Lightning components?
-Ken
- Ken Koellner
- November 05, 2014
- Like
- 1
- Continue reading or reply
Creating a name space for production (and sandbox) org?
But I'm confused about how to do this in our real development stream. We have a production org and some sandboxes we do development in. (We develop in sandboxes instead of individual developer orgs as we need common data that is setup for all developers and there's no way we could maintain it in several individual developer's org.)
In out production org and in our sandboxes, there is no "Edit" button to allow specification of Namespace on the Packages page.
So I'm unclear how to reserve a namespace. Any clue?
We do have a domain name registered. Does it have something to do with that?
- Ken Koellner
- November 04, 2014
- Like
- 2
- Continue reading or reply
callout about from queueable execute()
Callout not allowed from this future method. Please enable callout by annotating the future method. eg: @Future(callout=true) 07:13:51.752 (8701449752265601)|SYSTEM_METHOD_EXIT|[1263]|System.Http.send(ANY)Is there a way to annotate the execute with "(callout=true)".
I sounds like what i want to do may be doable if there's just some syntax to get the annotation.
- Ken Koellner
- October 31, 2014
- Like
- 3
- Continue reading or reply
apex:dynamicComponent in nested table/repeat
<apex:pageBlockTable value="{!accountWrapperList}" var="rowEntry"> <apex:repeat value="{!columnList}" var = "colEntry"> <apex:dymanicComponent value="{!myDynamicColumn}"/> </apex:repeat> </apex:pageBlockTable>
I'm trying to do something like the above where a pageBlockTable iterates over a list. Then within the table, the columns are determined via another list that contains a data structure with some info on the column including the label in a String member and the API Name in another string member. Then a dynamicComponent is included to generate the apex:column which will contain some more complex VF inside it. (It would be a very lengthy discussion to explain why I want to do that so I'll skip it for now.)
I'm not sure what I'm trying to do can be accomplished. For the value expression on the element that will contain the value, I think expression would have to be evalated twice. First an explession needs to be evaluated to get the field name, then an expression is needed for the value.
It's as if what I woud want to code be someting that returns a Component.Apex.Column and either that column or an element within that column would have an element equivelent to --
expressions.value = "{!rowEntry.{!colEntry.apiName}}"But obviously that makes no sense.
I can't think of anyway to code a getter for the dynamic component I want in this scenario.
Anyone that has any ideas, feel free to chime in.
- Ken Koellner
- September 16, 2014
- Like
- 1
- Continue reading or reply
Display an HTML file stored at attachment/file/document inline without download link
The file is an HTML document. I don't think I could use a simple outputText with HTML not escaped as VF is going to put <html> tags around the page. I'd end up with nested <html> tags which wouldn't work.
What I'd like to do is put the attachment/file/document in an iframe. But to do that, I'd need a URL to the content of the document and not a download link.
Anyone know if there's a way to do that?
- Ken Koellner
- May 19, 2014
- Like
- 1
- Continue reading or reply
SingleEmailMessage Messaging.sendMail sending additional headers.
My guess is there's no way to do it but I htought I'd ask just in case I missed something in the docs, or there's some super secret workaround trick I never figured out.
- Ken Koellner
- May 09, 2014
- Like
- 1
- Continue reading or reply
Anyway to configure some content on the Chatter tab?
When the sidebar shows in most of the other tabs, you can configure some content that appears. I know some people use that to put a bit of HTML with some javascript in it to slightly alter the rest of the page. For example, even though SF doesn't have a feature to override the colors on the page. If you put a bit of Javascript in something in the sidebar, you can change the colors.
I'm wondering if there's a way to to that on the Chatter tab but don't see any elements on the page that can be configured via administration.
- Ken Koellner
- March 12, 2014
- Like
- 1
- Continue reading or reply
Set Sites Public Access user email address to bogus noreply address
I'm thinking of changing the email address on public access sites user to a bogus address. At least in a sandbox, it doesn't appear to validate that it is a real address. I'd use something like noReply@myDomain.com. Then if email ever gets sent to things createdBy that user, it would go nowhere.
What I worry about is could there be any other email that gets sent to the Sites Guest User that we might miss if we went with that solution.
Any ideas?
- Ken Koellner
- January 28, 2014
- Like
- 1
- Continue reading or reply
More than one @HttpGet and/or @HttpPost per class
I'd like to set up an API for an Enterprise Integration Service consisting of many Get and Post methods.
It would be nice if I could put them all in one class. Is there anyone to put multiple @HttpGet and @HttpPost in the same class and have the last part of the path be different for each?
Otherwise, I'd need to define a class for each method.
The only other alternative would be to have just one get/post and have the input define what operation to perform and have the get post method act as a dispatcher to call the proper inner method. I'd rather not do it that way.
-Ken
- Ken Koellner
- January 13, 2014
- Like
- 1
- Continue reading or reply
limits on values in selectOption "Value is not valid"
That's an exact quote with the "." being in the text.
I made a coding change and left the label as is but changed the value to an artifical key. It works fine now.
I'm thinking there's some limit on who long or what can be in the value member of a selectOption. The Apex and VF manuals do not mention any restrictions in the documentation for the selectOption class.
I'm thinking maybe either the length or the "." broke it.
Anyone know if there are some limitation to what can be in the value member? If so, are they documented somewhere else?
- Ken Koellner
- January 08, 2014
- Like
- 1
- Continue reading or reply
VF and SF Sites public access to Standard Object Update.
I started a thread over on the Sites board but there doesn't appear to be much traffic over there so I'm posting a link here--
I researching doing a SF Site in VF that allows a public access user to both create a Cost Proposal in Opportunity and come back later an edit it.
Of course the sticky wicket is that Sites public access allows only Insert to Opportunity and OpportunityLineItem and not Update.
I do have what I think is a viable work around and post it with screenshot and sample code in the other thread.
I'm wonder if any other VF developers have run into this issue and found any other work arounds.
Feel free to comment here are on the other thread. (Might be better on the other other thread as that's where the details are.)
-Ken
- Ken Koellner
- November 09, 2013
- Like
- 1
- Continue reading or reply
Paste to Description Crashes Flash
I'm working throught the very first tip calculator tutorial. I figure rather than retype, I'd copy and paste text. Every time I try to paste Flash crashes. Not sure if it's just the machine I'm on. Anyone experience that?
I'm planning on converting a number of validation done in formulas and approval rules to flows and it would be a lot easier to cut and paste names than have to retype.
- Ken Koellner
- November 07, 2013
- Like
- 1
- Continue reading or reply
MIXED DML error and pricebookentry
I have some batchable apex, in the execute() method, udpates are done to pricebookentry.
I'm getting a weird mixed DML error. Originally I had pricebookentry and a custom table updated in the execute() but to be safe, I took out the other update. Now the execute() is issueing exactly one DML to pricebookentry for a few hundred rows. I still get the mixed dml error. Not sure how I could get a mixed dml error when there is exactly one DML issued.
09:23:22.107 (92107648000)|EXCEPTION_THROWN|[68]|System.DmlException: Update failed. First exception on row 0 with id 01u40000002CKwBAAW; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): CustomFieldDefinition, original object: PricebookEntry: []
The message doesn't make much sense as it says there's an attempt to update "CustomFieldDefinition". That sounds like metadata, not data. And as I mentioned, there is exactly one dml, to pricebookentry.
Yes, I did open a case with Tech Support. I updated the logic to a single DML this morning and added that to the case, still waiting on a response after that update.
I thought I'd post here anyway in case anyone else has experienced this anomoly.
- Ken Koellner
- October 07, 2013
- Like
- 1
- Continue reading or reply
Debug Log duration anomoly
Apex Debug Log Detail User Ken Koellner Date 10/1/2013 10:20:15 AM EDT Status Success Application Unknown Request Type Api Operation SerialBatchApexRangeChunkHandler Duration (ms) 163,082 Log Size (bytes) 16,757 Log 27.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 10:22:57.875 (162875309000)|EXECUTION_STARTED .... 10:22:58.074 (163074777000)|EXECUTION_FINISHED
Subtracting finished time from setart time, I get 199ms. How come it says duration is 163,082 ms ?
- Ken Koellner
- October 01, 2013
- Like
- 1
- Continue reading or reply
Any way to get a case-insenstive URL or indirect?
We have a sites URL http://ourcompany.force.com/XYZZY Some users are trying to access http://ourcompany.force.com/xyzzy and they are getting thrown to a generic page not found.
I could put in a redirect from http://ourcompany.force.com/xyzzy to http://ourcompany.force.com/XYZZY but that would work only for that one specific case. If a user tried http://outcompany.force.com/XYzzy they would still get a page not found.
Is there any way to make a sites URL case insensitive or have some sort of case-insenstitve redirect?
- Ken Koellner
- November 11, 2011
- Like
- 2
- Continue reading or reply
How to tell if a field is references in Apex
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)?
- Ken Koellner
- April 19, 2017
- Like
- 0
- Continue reading or reply
namespace hands-on org
Is there a way to have a hands-on org that's compatible with all Trailhead Modules?
- Ken Koellner
- April 11, 2017
- Like
- 0
- Continue reading or reply
Is there a way to generate WADL from an Apex REST Service?
- Ken Koellner
- January 19, 2017
- Like
- 0
- Continue reading or reply
Is there anyway to keep the Eclipse IDE from included Referenced Packages?
Is there anyway to get the Eclipse IDE to not load the stuff in Referenced Packages?
- Ken Koellner
- December 19, 2016
- Like
- 0
- Continue reading or reply
where is documentation for apex-lang?
- Ken Koellner
- December 09, 2016
- Like
- 0
- Continue reading or reply
ActionFunction takes user to PageReference
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
- Ken Koellner
- June 21, 2016
- Like
- 0
- Continue reading or reply
View Lines of Code Coverage on result of Fast Validation
Anyone know if there's a way to view lines covered after a validation?
- Ken Koellner
- June 07, 2016
- Like
- 0
- Continue reading or reply
SOQL Query parent fields via objectId 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
- Ken Koellner
- April 17, 2016
- Like
- 0
- Continue reading or reply
Include Lightning Component in Sites VisualForce 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?
- Ken Koellner
- October 16, 2015
- Like
- 2
- Continue reading or reply
On Insert why would you get UNABLE_TO_LOCK_ROW?
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?
- Ken_Koellner
- May 18, 2010
- Like
- 1
- Continue reading or reply
How do I put a <meta> tag inside <head>?
- amorgan
- May 02, 2010
- Like
- 0
- Continue reading or reply