• Aiden
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 16
    Replies

Users can easily "Create new view" such as with leads.

 

I know that in Visualforce, it's possible to query what views are available to a user, and even show a data table for this view.

 

So, here's my question. Is there anyway that I could get access to the underlying OSQL for the view query? I'd like to do a join with a user defined view and a custom table.

 

thanks!

Aiden

  • October 15, 2010
  • Like
  • 0

There is some great documentation on best practices for Enterprise Developers. 

 

I'm working on a product that we're releasing for sale on App Exchange. Our engineers have done a ton of software development on different platforms in the past, but never for Salesforce.

 

In more traditional systems, we'd check code changes into SVN or other repository, and then use a build system such as Hudson to kick off an official nightly build. We know that the build is clean and reproducable - all build content came from SVN.

 

In Salesforce, from what I can see, solid SVN integration is available via the Force .COM IDE in Eclipse. However, this appears to typically take a secondary role for comparing diffs across different file versions rather than acting as the master in a build process. Is this correct?

 

Are there best practices in build automation that we should be aware off? How ISVs typically ensure a reproducible release process?

  • October 12, 2010
  • Like
  • 0

I'm running into an issue in Firefox with the Winter 11 release and the new UX theme.

 

Here's a Visual Force page that reproduces the problem;

 

 

<apex:page controller="WVRouteMiner" sidebar="false">
<apex:includeScript value="http://maps.google.com/maps?file=api&v=2&key=abcdefg"/>      
    
<apex:form >
</apex:form>
</apex:page>

<apex:page controller="MyController" >

<apex:includeScript value="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"/>          

<apex:form >

</apex:form>

</apex:page>

 

 

With this page if you try the drop-downs (e.g. the Force.COM dropdown shown in the top right for the new theme) you'll see that it works OK in Internet Explorer but not in FireFox. 

 

I was able to narrow down this problem to including the above script. Presumably, there is a conflict with the included script and with Salesforce. I don't see any errors or issues in Fire Bug relating to this. 

 

Does anyone have any suggestions on how to resolve? 

 

Thanks!

Aiden

  • October 04, 2010
  • Like
  • 0

Hi there,

 

I have an application that results in emails around apex governor limits. For example, from my apex code I do the max number of call-outs possible (10 out of 10) by design. 

 

I'm assuming that potential customers will not get these types of warning emails where they install our app from the App Exchange. Is this correct? If not, how can we mitigate this, after all the code is by design and the warnings are not readily actionable by the end user.

 

thanks!

Aiden

  • September 25, 2010
  • Like
  • 0

I'm validating that my application will work OK on IE6. I'm running IE6 on a Virtual PC, IE version number 6.0.2800.1106.

 

This code works great on FF, Chrome, IE8 etc. 

 

I narrowed down a script error thrown in IE6 to the use of rerender for the command button on the following trivial code sample;

 

<apex:page controller="MySimpleController">
<apex:form id="MyTestForm">
<apex:commandButton value="TestButton"  id="TestButton" action="{!DummyFunction}" rerender="TestOutput" />
<apex:outputPanel id="TestOutput">
</apex:outputPanel>
</apex:form>
</apex:page

 

<apex:page controller="MySimpleController">

<apex:form id="MyTestForm">

<apex:commandButton value="TestButton"  id="TestButton" action="{!DummyFunction}" rerender="TestOutput" />

<apex:outputPanel id="TestOutput">

</apex:outputPanel>

</apex:form>

</apex:page>

 

 

For the above VisualForce, IE6 throws a script error; Expected '}' at line 140

 

If I remove the rerender from the commandButton, the script loads OK. Any ideas? Known bug or issue?

 

For reference, the customer controller is as follows;

 

public class MySimpleController 
{
    public PageReference DummyFunction()
    {
        return null;
    }
}

 

  • September 16, 2010
  • Like
  • 0

The documentation states that;

"five queued or active batch jobs are allowed for Apex."

 

If I'm creating a managed application as an ISV Partner for App Exchange, then can I take that the application have a maximum of 5 queued or active batch jobs for it's namespace, without impacting the customer's ability to also create up to 5 batch jobs in their own apex code? I'm assuming that this is the case from reading the "Execution Governors and Limits" documentation, though it doesn't specifically address the batch job case, so would like to double check here.

 

thanks!
Aiden

 

  • August 21, 2010
  • Like
  • 0

The following warning is frequently shown to me regardless of the file I'm looking at;

Warning: The element type "param" should be terminated by the matching end-tag "". at line 82

 

I get this, even where there is no content in the current file. For example, I went to create a new APEX class, and this warning is presented with the empty class in the Apex Class Edit dialog. As such, its surprising to me that I see the error without a reference to the offending code file. Any ideas on what this warning is, and how best to track it down?

  • August 20, 2010
  • Like
  • 0

I have a fairly complex Visual Force page with associated controller. A couple of support pages reference the same controller. As I redirect to the support pages, and back again, generally everything is fine. But every so often, I get a crash. I tracked this down to the controller losing state. From the debug logs I can see that its constructor is being loaded again in these cases.

 

It seems worst when network connectivity is poor, but otherwise I can't identify any reason as to why the controller would occasionally lose state. There is no consistent repro. Does anyone have any ideas as to what might the root issue might be?

  • August 11, 2010
  • Like
  • 0

I've created a custom object that stores data for a record, including it's location (via latitude/longitude). I need to add this for a number of standard records including Leads, Contacts and Accounts. I'd like this in a single object for performance reasons. For example, now I can query what standard records are in a given area in a single query rather than querying each of Leads, Accounts, Contacts etc. separately. 

 

Conceptually, I'm looking for the equivalent of a master detail relationship to my custom object. However, I had to implement this as a lookup relationship as master-detail isn't supported for all records (e.g. can't have a master detail relationship from Leads to my Custom object). To this end, I had to implement my own triggers, e.g. to delete row in the custom object if the "parent" is deleted. 

 

As I mentioned, I'd like to make a single query to my custom object from Apex rather than make a bunch of queries to the parent records. However, now I'm concerned about security - that a user can get back records that they otherwise wouldn't have permission too. Is there any way to grant a row being inserted in my custom object the exact same permissions as on a "parent" object (I have access to the parent SObject when I'm inserting the custom object record)? Are there big gotchas in this approach (e.g. that permissions on the parent object could change and not ripple through?).

 

 

  • July 09, 2010
  • Like
  • 0

I'm trying to do a process a large batch or records, where I need to do a web service call out for each record.

 

I'm using an action poller to process the batch a chunk at a time. The first thing I do is select a set of records, using the "for update" keyword. I'm then doing all the callouts together and caching the results before doing all the updates. I'm doing this as I was getting DML errors if I mixed callouts with updates.

 

When I do go to do the updates, I sometimes get the UNABLE_TO_LOCK_ROW error which is surprising given that the records were selected for update. (I'm not easily able to distill the code used, but have verified that the select with update took place via debug log analysis).

 

For a test, I changed code to all as above without the callout and everything works just fine... all records are updated with no lock issues. Are there any known issues with callouts affecting the status of previously locked sObjects? Or any known issues where you can do a select for update, yet then still fail with an unable to lock row error?

 

thanks

  • June 02, 2010
  • Like
  • 0

I'm doing most of my development via Eclipse. From this IDE, I can easily check in apex classes, visual force pages etc. into Source Control. The only gotcha is that new field definitions etc. don't appear to be synchronized to Eclipse. I'm wondering how folks add these to source control?

 

thanks!

Aiden

  • May 28, 2010
  • Like
  • 0

If I go into Salesforce Accounts, and click Save, the command buttons instantly go grey giving the user great feedback that the button has been pressed. 

 

How can I mimic this Salesforce functionality using the Apex:CommandButton? I tried changing the button via controller, but anything I do here suffers from client to server latency. thanks!

  • May 28, 2010
  • Like
  • 0

There is some great documentation on best practices for Enterprise Developers. 

 

I'm working on a product that we're releasing for sale on App Exchange. Our engineers have done a ton of software development on different platforms in the past, but never for Salesforce.

 

In more traditional systems, we'd check code changes into SVN or other repository, and then use a build system such as Hudson to kick off an official nightly build. We know that the build is clean and reproducable - all build content came from SVN.

 

In Salesforce, from what I can see, solid SVN integration is available via the Force .COM IDE in Eclipse. However, this appears to typically take a secondary role for comparing diffs across different file versions rather than acting as the master in a build process. Is this correct?

 

Are there best practices in build automation that we should be aware off? How ISVs typically ensure a reproducible release process?

  • October 12, 2010
  • Like
  • 0

I'm validating that my application will work OK on IE6. I'm running IE6 on a Virtual PC, IE version number 6.0.2800.1106.

 

This code works great on FF, Chrome, IE8 etc. 

 

I narrowed down a script error thrown in IE6 to the use of rerender for the command button on the following trivial code sample;

 

<apex:page controller="MySimpleController">
<apex:form id="MyTestForm">
<apex:commandButton value="TestButton"  id="TestButton" action="{!DummyFunction}" rerender="TestOutput" />
<apex:outputPanel id="TestOutput">
</apex:outputPanel>
</apex:form>
</apex:page

 

<apex:page controller="MySimpleController">

<apex:form id="MyTestForm">

<apex:commandButton value="TestButton"  id="TestButton" action="{!DummyFunction}" rerender="TestOutput" />

<apex:outputPanel id="TestOutput">

</apex:outputPanel>

</apex:form>

</apex:page>

 

 

For the above VisualForce, IE6 throws a script error; Expected '}' at line 140

 

If I remove the rerender from the commandButton, the script loads OK. Any ideas? Known bug or issue?

 

For reference, the customer controller is as follows;

 

public class MySimpleController 
{
    public PageReference DummyFunction()
    {
        return null;
    }
}

 

  • September 16, 2010
  • Like
  • 0

The following warning is frequently shown to me regardless of the file I'm looking at;

Warning: The element type "param" should be terminated by the matching end-tag "". at line 82

 

I get this, even where there is no content in the current file. For example, I went to create a new APEX class, and this warning is presented with the empty class in the Apex Class Edit dialog. As such, its surprising to me that I see the error without a reference to the offending code file. Any ideas on what this warning is, and how best to track it down?

  • August 20, 2010
  • Like
  • 0

I have a fairly complex Visual Force page with associated controller. A couple of support pages reference the same controller. As I redirect to the support pages, and back again, generally everything is fine. But every so often, I get a crash. I tracked this down to the controller losing state. From the debug logs I can see that its constructor is being loaded again in these cases.

 

It seems worst when network connectivity is poor, but otherwise I can't identify any reason as to why the controller would occasionally lose state. There is no consistent repro. Does anyone have any ideas as to what might the root issue might be?

  • August 11, 2010
  • Like
  • 0

I've created a custom object that stores data for a record, including it's location (via latitude/longitude). I need to add this for a number of standard records including Leads, Contacts and Accounts. I'd like this in a single object for performance reasons. For example, now I can query what standard records are in a given area in a single query rather than querying each of Leads, Accounts, Contacts etc. separately. 

 

Conceptually, I'm looking for the equivalent of a master detail relationship to my custom object. However, I had to implement this as a lookup relationship as master-detail isn't supported for all records (e.g. can't have a master detail relationship from Leads to my Custom object). To this end, I had to implement my own triggers, e.g. to delete row in the custom object if the "parent" is deleted. 

 

As I mentioned, I'd like to make a single query to my custom object from Apex rather than make a bunch of queries to the parent records. However, now I'm concerned about security - that a user can get back records that they otherwise wouldn't have permission too. Is there any way to grant a row being inserted in my custom object the exact same permissions as on a "parent" object (I have access to the parent SObject when I'm inserting the custom object record)? Are there big gotchas in this approach (e.g. that permissions on the parent object could change and not ripple through?).

 

 

  • July 09, 2010
  • Like
  • 0

I'm doing most of my development via Eclipse. From this IDE, I can easily check in apex classes, visual force pages etc. into Source Control. The only gotcha is that new field definitions etc. don't appear to be synchronized to Eclipse. I'm wondering how folks add these to source control?

 

thanks!

Aiden

  • May 28, 2010
  • Like
  • 0

If I go into Salesforce Accounts, and click Save, the command buttons instantly go grey giving the user great feedback that the button has been pressed. 

 

How can I mimic this Salesforce functionality using the Apex:CommandButton? I tried changing the button via controller, but anything I do here suffers from client to server latency. thanks!

  • May 28, 2010
  • Like
  • 0

i have been trying to get datepicker to work with my visualforce page. I set it up but i can not get the calendar to pop up. 

Here is my code:

 

 

<apex:page controller="testController">
<link type="text/css" href="{!URLFOR($Resource.css)}" rel="stylesheet" />
<script type="text/javascript" src="{!URLFOR($Resource.Jquery)}"></script>
<script type="text/javascript" src="{!URLFOR($Resource.core)}"></script>
<script type="text/javascript" src="{!URLFOR($Resource.Datepicker)}"></script>
 
<input id="datepicker" type="textbox" />
<script type="text/javascript">
    $(function() {
        $(“#datepicker”).datepicker();
    });
    </script>
 
<apex:form >
 <apex:inputText value="{!inputValue}" id="datepicker"/><br/>
 <apex:commandButton action="{!testAction}" value="testButton"/>
 </apex:form>
</apex:page>

 

 

Thanks for any help you can give.

Force.com(Apex/Visualforce) developers spend lot of coding time waiting for file SAVE operation to finish. This is specially panic for developers working on huge force.com projects having many classes, pages, objects and components.

I recently figured out a way to boost-up the save and refresh(from server) speed on Force.com Eclipse IDE. The secret to go faster is to checkout only selective metadata components in a single force.com eclipse project. By default on creating a “New Force.com Project” in eclipse, “classes, triggers, pages, components, and static resources” are downloaded. I never need static resources locally in my eclipse workspace so why download them :-) 

 

For more details check this : http://www.tgerm.com/2010/03/fast-save-refresh-force-ide-eclipse.html 

Hi all,

 

I have a dynamic query which returns me some field names 

 

public List<leadStore> getStoredLeadVals() { String myId = getRuleSetId(); String limitClause = ApexPages.currentPage().getParameters().get('lt'); System.debug('LIMIT VAL: ' + limitClause); String query; query = 'select lead_id__c, score__c, map__c '+ ' from lead_store__c ' + ' where ruleSetId__c =\'' + myId + '\' order by lead_id__c limit ' +limitClause; System.debug('Query:' + query); List<lead_store__c> storedLeads = Database.Query(query); String AllIds = ''; String AllIds1 = ''; for (lead_store__c lsc : storedLeads) { AllIds += '\'' + lsc.lead_id__c + '\','; } AllIds1 = AllIds.substring(0, AllIds.length()-1); String allFldNames = ''; // TODO: Get me the fieldNames from the scoringRule List. // Store it in a Map so that we see only right values Map<String, String> ruleNamesMap = new Map<String, String>(); List<ScoringRule__c> scoringFlds = [select rulename__c, Id from ScoringRule__c where RuleSetId__c =: myId]; for(ScoringRule__c s : scoringFlds) { ruleNamesMap.put(s.ruleName__c, s.Id); } Set <String> s = ruleNamesMap.keyset(); for (string si : s) { allFldNames += si + ','; } String lstQry = 'select id, '+ allFldNames + ' name from lead where id in ('+ allIds1+ ')'; System.debug('Lead qry: ' + lstQry); List<Lead> ldSto = Database.Query(lstQry); for (Lead l : ldSto) { for (lead_store__c lsc : storedLeads) { if (lsc.lead_id__c == String.valueOf(l.Id)) { lSt.add(new leadStore(lsc,l)); } } } return lSt; }

 

I want to display the field names taht i get in this list on my visualforce page.

 

Any idea on how can i do that? Any help is much appreciated!!

 

 

Regards

Mukul

 

 

  • August 20, 2009
  • Like
  • 0
I hope someone can help me.  I have a VF page that includes 4 tabbed sections.  One of them is a custom search tab.  When the user types their criteria (an account name) into the inputtext box, and clicks my search button, everything works great.  If the user types in their criteria, then presses "Enter",  the page refreshes and takes the user back to the first tab (my search tab is the fourth tab).
How can I get pressing enter to be the same as clicking the button?

Thanks in advance!!

Jim
  • August 27, 2008
  • Like
  • 1