• Brendan Lally
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 44
    Replies
I have an page for an object which should always have a record. If it does not have a record then I want to create a new one using a vf page.

What would be the best way to do this?

Thought about checking for the existance of the record and then redirecting them to the other page if it does not exist, but not sure how to do this. Could also have two page sections, one displays if there is a record present and one if not, but would this be the best way?
I have a component that has a value passed into it from a VF page. The attribute is then passed into the components controller where the value needs to change. Is there any way to get this value back to the main page?
I have a VF page that uses the tabPanel and tab components. If the user clicks a tab's label to switch to a different tab, I don't want to switch to the new tab immediately. Instead, I'd like to see whether the user has made any changes to the form fields in the original tab. if so, I'd like to display a message asking if the user really wants to switch tabs without first saving his changes.

Is there any way (perhaps through JavaScript) to catch when a user has clicked on a tab's label? I've tried using the various event attributes of the tab and tabpanel components, and while some of them allow me to capture a click on the entire tab, none of them seem specific to a tab's label.

If I can determine whether the user has clicked on a tab's label, is there a way to control whether the page actually displays the contents of the clicked tab?

As a secondary issue, is there any easy way to determine whether the values of any of the form fields have changed? I can think of some ways to do this in JavaScript (for example, when the page is loaded, iterate over the form field values to remember their initial values, then iterate over them again later on to see if anything changed), but is there anything built into Apex to make this easier?

Thank you,

Jeri
Does anyone know if this can be done in Visual Force? I'm trying to display the filter below so user's can click on the letter and it returns the shortened list.  Any examples?
 

Yesterday's Winter09 Developer Highlights webinar mentioned some interesting new developer account features.  We were advised that we need to sign up for a fresh DE account to receive the new features, because existing DE accounts will not get the new features.  However, if I'm understanding correctly, developers that have already published managed-released packages from existing DE accounts will have a package prefix that is tied to their existing DE org.  That prefix is also intrinsic to the single managed package that is also tied to that org.  As far as I understand it, the tying of the prefix and the managed package to the DE account are key to making the package upgrades work.

So I think this means that existing managed apps cannot be moved to new DE orgs as far as I am aware.  Is there a way for these DE accounts to be upgraded to receive the new DE features?  Otherwise developers of existing managed packages won't have access to the new DE features.  Or maybe there's something I'm missing here?

Is there  any kind of document/guide that explains in details exactly what happens on a VF page when you click a command button?    Which gets are run, which sets are run, what exactly is rerendered, etc?  Right now, I am having to work this all out by trial and (lots of) errors.

Thx,
Hamayoun
Doug,
Or whoever is picking up this mantra.

I c little recent activity/fixes on the ASF code and several requests/bug fixes needed (namespace prefix etc..)

Where is ASF in SF-land as regards being working on, very active, new releases, stagnating, future roadmap etc...

Lal
I get a compile error if I try and create a map of a x-object join table

I have object A and B with a join table of AB

If I try the following I get the following - compile error - Invalid type:AB
..Map ab_recs = new Map();


does this mean that x-object join tables cannot be 'mapped'


I know I can run a query that gives me data from A and B via __r but how do I setup an (map) object to receive them. Will this work if its a List?
for example
I can setup
...Map a_recs = new Map();
and happily read in an 'A' record and access its fields via a_recs.get.(i).fieldname
but if I do a query where its pulling back parent/child related recs via __r or '.' notation HOW is that mapped now?
Can't c how I can do a a_recs.get(i).parentfieldname?

don't c any info on this in docs/cookbook etc.

Lal
On a custom object I've created a custom field of type text, length=200
I then try and get any Hyperlink formula and I keep getting

Error: Function HYPERLINK may not be used in this type of formula


tried HYPERLINK("anywhere" , "Do stuff")

tried HYPERLINK("00U/e?retURL=%2F006x0000001T8Om&what_id=" & Id, "Create Event")
as per https://na5.salesforce.com/help/doc/user_ed.jsp?section=help⌖=customize_functions.htm&loc=help&hash=HYPERLINK
doesn't like the Id so delete that and then get the 'may not be used'


any ideas?
in developer edition

Lal
BrainEngine has just released the first version our Developer Workbench product. Features Include:
  • Ability to work simultaneously with several queries in separate windows
  • Editing capabilities: snippets, intellisense, syntax highlight, code folding
  • Export data to 8 popular formats: MS Excel, MS Access, MS Word, RTF, HTML, PDF, XML, and CSV
  • Import data from MS Excel
  • Generate reports on object definition, object schema and relationships
  • Generate object ER Diagrams
  • View Page Layout Definitions
  • Outbound Messaging Support
  • Enhanced HTML Page Editor
The Workbench comes in two different versions. The Community Edition (freeware) and the Professional Edition (Community Edition + Priority Support). Click here for more details
can i access one of my server databases from within salesforce?.
Hi

I have created one visual force page with Custom Controller
Now i want to override that page on standard button "New".
now when i click on "Override" link from setup it redirects me on proper page but there is no Visual Force pages available in dropdown list of Visual force pages.

What could be the problem?

any idea?

Thanks in Advance
Hello everyone

I'm having problems with a listview inside a tab panel. I've created two tabs inside the panel, the first one contains a form and the second one a listview. The problem is that once I enter to the second tab (the one with the list view) and click for example a letter in the list view to see only records that start with that letter, the whole VF page is refreshed and I get back to the first tab, the second tab now contains only the records that start with the letter I selected, however since the page was refreshed I landed in the default tab, which is the first one.

I've already tried passing the selected tab name to the controller and setting a String with this name in order to use it in the value property of the tabpanel component:

Code:
<script>
function updateTab(tabname){
      switchTab(tabname);
}
 </script>

 <apex:form >
 <apex:actionFunction name="switchTab" action="{!switchTab}" immediate="true">
  <apex:param name="tabvalue" value="" />
 </apex:actionFunction>
 </apex:form>

     <apex:tabPanel id="tabcontainer" value="{!selectedTab}">

<apex:tab id="tab_1" name="tab_1" ontabenter="updateTab('tab_1');"/>

<apex:tab id="tab_2" name="tab_2" ontabenter="updateTab('tab_2');">
  <apex:listViews type="theObject__c"
</apex:tab>

And the controller:

public String selectedTab{get;set;}

    public void switchTab(){
     
         selectedTab = System.currentPageReference().getParameters().get('tabvalue');    
     
    }

 Any help will be very appreciated, thank you very much.



Message Edited by jonathan rico on 09-01-2008 12:34 PM
I have a custom object defined with a namespace/custom prefix : the resulting classname is something like ALT__Myklass__c

I wish to define Myklass in ActiveSFDC :
Code:
class Myklass < ActiveRecord::Base
    include ActiveSalesforce::ActiveRecord::Mixin
    set_table_name("ALT__Myklass__c")
end
This does not work : ActiveSFDC looks for ALT_Myklass (notice only 1 underscore), or defaults back to ALT_Myklass__c (still only 1 underscore). This does not work either if we do not set_table_name : AsctiveSFDC goes llooking for Myklass__c, with no prefix.


ActiveSFDC needs to handle namespace prefixes correctly, just as it handles custom '__c' suffixes.