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

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 44
    Replies
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
I'm happily using a List array for a custom object (Listings__c) in my extension controller and returns and displays happily on the front-end.

Using Lists.add( x); to add my custom record (x) entry's into the Lists array


At one stage (after I delete a record) I need 2 update my array and get rid of the (now) deleted assoc rec.


Using the following code - but getting an error = "Error: Compile Error: Method does not exist or incorrect signature: [SOBJECT:Listings__c].remove()"

..for (Integer i=0; i < Lists.size(); i++)
.....{ if (Lists[i].id = exist_L.id)
.........{ // zap that row from the lists array
.............System.debug(LoggingLevel.INFO,'zapped #'+i+' in Lists, key='+Lists[i].Name);
.............Lists[i].remove(); // P33 and P189 Apex Lang ref
.........}
.....}

Now I know that my sObject doesn't have a remove() method but the List array (Lists) should know it and process it for that position (i)

Lal
It appears (as a 'feature') that when a user comes into a list view (Picking an Object TAB and get a list of records)
that the criteria on what it shows is confusing (I cannot find any documentation on this as regards what steps SF follows).

Some of the time it appears it lists the records dependant on what the user had 'chosen' last (if recently viewed/created/modified has been invoked before). However this is INDEPENDANT of what the choice is within the top 'view' pulldown list.
Its confusing that its not a combination.

1) can I force a default view to be (programatically?) always forced for the user when they come in (at least if its the first time since they've come into this session)

2) can I force a refresh (or at least have a choice of which 'rules')  of the view (that is shown when the user comes into the list). As by default it is not refreshed. The user has to press the (view) GO button to really see the records relating to this view
(This is really confusing to a new user (as in "where did all the records Joe showed me are 'gone' ")

3) if neither of the above can I create a message that is show on all views that says (Press the GO button to refresh the data)

4) if I don't use the '/o' at the end of a URL for a list view (for each of my tabbed objects) then I don't get the RV/RC/RM extra 'view' - can I use this by default (any setting?)

PS I have the 'enhanced list view' turned off at the moment

Lal
On some of my custom objects I was an auto-generated Id (such as L########).
In this case the A..Z for views never makes any sense (as all I have are ID's starting with character 'L')

how do I turn them off

(note: I cannot find any reference in any of the online docs/help mentioning the A..Z 'feature')

Lal
as per VisualForce: Tabbed_Accounts_in_30_seconds
I am trying to override a standard button (within a custom object) to VF code I've created

When I pick the 'VisualForce Page' button within the override , nothing is available.
I have two VF pages.
I've tried both custom objects and std objects and no difference.

that one I want is called   cases_inner_tabs  and is setup in Develop/Pages
as  <apex: page standardController="Cases__c" showHeader="true" tabStyle="account" extensions="Cases_extn">

I had it used within a Web VF tab but no deleted that so 'Where is this used?' is now empty
If I go 2 my custom object  Cases and try and override its View button as a VF - its not there?


Why do they not show up ?
(on Developer account)

Brendan
In http://wiki.apexdevnet.com/index.php/Tabbed_Accounts_in_30_seconds
I've done the same for my custom object and it works pretty good.
On mine I have defined  TAB-A, TAB-B, TAB-C
I have extension controller code getting called on one of my extra Tabs (TAB-B) and that works fine too.

However I want it to return the user exactly where they were (in TAB-B) but I cannot find what that tab reference/url is.
It appears to be a Frame with a hidden field (j_id0:CaseTabPanel=TAB-B)

Any ideas on how I'd re-render that back from my controller (via PageReference ?)

Thanks
Lal
I have a 'Cases' parent record that looks at associated 'Listings' records via a two-way Master-Detail join table (Case_to_Listings). All of these are custom objects and work ok.

I've VF code that gives a better interface when dealing with a Case. It displays one detail record (like an Account) and then a list of listings (sort of like unconnected Contacts). The user can then click on a specific listing (via Action Add2Case) and that listing is then written to the junction table so its now associated.

That works but on the way back I want to re-render the listings so the one just picked is now gone (as Sql query will have that dropped now - I also do an updated on Listings and reset assigned field),
However my re-re-render doesn't seem 2 work?
If I do a refresh when the page comes back the line/row goes.
1) What am I doing wrong?


2) Love to have the ability for the user to select multiple records at a time (like S-Control GETRECORDIDs) but don't see any examples of that.

3) Also if the user comes into this without picking a case id (no ?id= is passed into VF page) how do I redirect back to the 'Cases' standard view (/aOA/o ). I have several views defined on Cases butl can't see how to pick (or redirect from controller) the default (no view selected) view.

Thanks
Lal

Code:
 <apex: page standardController="Case_to_Listings__c" extensions="CL_extn" showHeader="true" cache="false">

<apex: outputPanel id="msgs">
     <apex: messages layout="list"/>
</apex: outputPanel>

<apex: form >
 <apex: pageBlock title="Detail">
   <apex: detail subject="{!Case_to_Listings__c.Cases__c}" relatedList="Cases__c" />  
 </apex: pageBlock>

 <apex: pageBlock title="Listings that can be associated">
    <apex: dataTable value="{!All_Listings}" var="lists" id="AllListings" headerClass="headerRow" rowClasses="dataRow" styleClass="list">   
        <apex: column >
             <apex: facet name="header"><b>Action</b></apex: facet>
             <apex: commandLink style="font-weight: bold" action="{!Add2Case}" value="Add to Case" rerender="AllListings">
                <apex: param name="listingsId" value="{!lists.Id}"/>    
            </apex: commandLink>
            <apex: actionSupport event="onclick" rerender="AllListings"> </apex: actionSupport>
        </apex: column>
        <apex: column >
             <apex: facet name="header"><b>Listing ID</b></apex: facet>
             <apex: outputLink value="/{!LEFT(lists.Id,15)}"> {!lists.Name} </apex: outputLink>
         </apex: column>
   </apex: dataTable>    
 </apex: pageBlock>    

 </apex: form>

</apex: page>

and extn controller
Code:
public class CL_extn 
{
    private final Case_to_Listings__c curr_CL_rec ;
    private List<Listings__c> lists = new List<Listings__c>();

    public CL_extn( ApexPages.StandardController controller )
    {
        Id id = ApexPages.currentPage().getParameters().get('id');
        curr_CL_rec = (Case_to_Listings__c)controller.getSubject();

//      if an empty id then send pack (Pageref—) to Cases std view - HOW–

        loadAllListings();
    }

    private void loadAllListings()
    {
        List<Listings__c> sql_lists;
        sql_lists = [SELECT Id, Name FROM Listings__c WHERE assigned__c <> true ];
        for ( Listings__c one_rec : sql_lists )
          { lists.add( one_rec);}
    }

    public List<Listings__c> getAll_Listings()
    { return lists; }

   public PageReference Add2Case()
    {
        Id curr_id = ApexPages.currentPage().getParameters().get('listingsId');
        Case_to_Listings__c new_CL;        // new CL record
        try {
            new_CL = new Case_to_Listings__c( Cases__c    = curr_CL_rec.Cases__c, 
                                              Listings__c = curr_id );
            Database.insert( new_CL );
            //update the Listings record with assigned=true ....
            } 
          catch (DmlException e) 
            { System.debug(e.getMessage()); }

        return new PageReference( '/apex/Case2Listings˜id=' + curr_id );
      }
}


 

 

Using the latest Apex Explorer v8.0 (on windows) I cannot see any many to many relationship tables that I have created. My m2m table has two fields both with Master-Detail relations to two seperate objects. It works fine - summer'08 rls. Bug? Lal
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?

  • October 09, 2008
  • Like
  • 0
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.
  • March 19, 2007
  • Like
  • 0