• tobibeer
  • NEWBIE
  • 50 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 12
    Questions
  • 14
    Replies

Is possible use apex:detail with different page layout? Because now is shown page layout which is assignment to record type and I want have some related lists, fields on my custom Visual force page and all on standard page of object.

I know that I can use fields and apex:relatedList, but I am searching for the simplest solution, which can customer manage (without edit of code he can not add other relatedList)

Hi everyone,

 

I am a bit stumped to find myself unable to query Non-ASCII unicode characters using SOSL.

 

For example, take a word containing a German Umlaut like Äpfel and put it into the name or some other textfield you are querying.

 

How does one have to construct the SOSL query so that it actually returns something?

 

Researching for information on how to do this did not yield any helpful clues. I even created a class to convert all characters to their unicode representation and stuffed that into the sosl query without luck.

 

After some more testing it seems to get even worse.

 

Not only does my SOSL query not retrieve results for words containing non-ASCII characters. If I search for a word made of pure ASCII characters that is also contained in a record which has a non-ASCII word in it, SOSL does NOT retrieve it like it does retrieve other records?!?

 

I have tested this by puttung a non-ascii word into either the name or any other queried field. SOSL always fails to retrieve the record.

 

 

Thanks for your feedback, Tobias.

How can I programatically verify whether or not a page by the name of "xyz" exists?

 

Neither the ApexPages namespace nor the PageReference object seem to provide any such method.

I am using a single index page which I call dispatcher and which decides on what to do with any incomming call. It is using a StandardController for a custom object with a controller extension and dynamically binds templates. I have a rewriter class that maps any incomming url to a custom object, if found. All that works well. However, there are a few exeptions where I am not sure as to how to distinguish them in my controller extension from any redirected pages which are:

 

1) the index page being called as the home page

2) the index page being called as the 404 error handling page

 

So, here are my questions...

 

A) How can I detect in the controller extension for my unified startpage that it is being called as either the home page or via 404 error handling? ...the standard behaviour being implemented via /dispatcher?id=CustomObjectId.

 

B) How can I, alternatively, make my url rewriter 404 status aware, such that it not only redirects to some other url but also returns a 404 http status to the client?

 

Cheers, Tobias.

I am struggling with writing some (after event) trigger wherein it seems that a roll-up summary field that I want to check is not yet recalculated. Doing a database lookup for the children of a given master node reveals that the database indeed reflects any changed records, yet the corresponding roll-up does not.

 

Thus, is there a way to force-update a roll-up summary field, hoping that this will recalc to reflect the changes?

 

I mean, I am using a simple count of child objects and I guess I could easily calculate that in my trigger ...but that's exactly what I intended to use the roll-up summary field for, to simplify coding and to use it in other formula fields.

 

Cheers, Tobias.

I am struggling to pass down a map to a component. The following...

 

    <apex:attribute name="dict" type="map" description="descr" required="true"/>

... does not work as type map does not seem supported. So, I have set out to define my own apex class...

 

//simple wrapper for a custom map class
global with sharing class MyDict{
    global MyDict(){}

    private Map<String,String> dictionary = new Map<String,String>();
    
    public String get(String entry){
        return this.dictionary.get(entry);
    }

    public Void put(String entry, String translation){
        this.dictionary.put(entry,translation);
    }

    public map<String,String> getDict(){
        return this.dictionary;
    }
}

 

Well... so far so good, I can create, populate and retrieve an instance of MyDict in my page controller like this...

 

    //create dict instance
    private MyDict dict = new MyDict();

    //populate dict
    List<Dict__c> dic = Dict__c.getall().values();
    for (Dict__c d : dic) {
        this.dict.put(d.name,String.ValueOf(d.get(this.lang+'__c')));
    }    
    
    //return dict
    public SettingsDict getDict()  {
        return this.dict;
    }

 

Well, however, I fail to retrieve a corresponding value of said map in my Component...

 

 

<apex:component controller="SubmitCaseController" allowDML="true">
    <apex:attribute name="dict" type="MyDict" description="the dictionary" required="true"/>
    <h1>{!dict.get('someEntry')}</h1>
</apex:component>

 

How am I to access the data in the underlying map from within a Component? Or, how else could I hand down a map from a controller to a page to a component being called form within that page?

 

 

Cheers, Tobias.

@ Force.com DevTeam,

 

Please implement multiple, subsequent criteria - instead of just one - for sorting related lists that are displayed for (custom) objects via their respective PageLayout.

 

Usecase

Imagine a custom object, each record having a custom field called collection and one called sort order with respect to the collection. I would want to be able to sort records in the related list as follows:

 

  1. by collection
  2. by sort order within the collection
I can easily imagine other usecases where multiple sort-criteria would facilitate working with related lists.
Cheers, Tobias.

 

 Hi all.  I am starting my first application, and am connecting via PHP using the partner.wsdl.  I have created a custom 'Contact' object, and am now trying to pull this data via PHP.  Here is the query:

 

$query = 'SELECT C.Id, C.Full_Name__c
          FROM Contact__c C'; 

$result = $mySforceConnection->query($query); $sObject = new SObject($result->records[0]); print_r($sObject);

 

I have successfully connected and made a query, but the query is simply returning an empty result of (using PHP's print_r):

 

 

SObject Object ( [type] => Contact__c [fields] => [Id] => a )

 

Am I dealing with some kind of visibility issue with my custom object?  I have a number of 'Contacts', and the fields I am querying are correct, but again, no data.

 

Thanks for any pointers/assistance, it is truly appreciated!

 

Can someone explain, why this VisualForce page...

 

<apex:page showHeader="false" standardStylesheets="false" standardController="SitePage__c" extensions="pageController">
    <apex:composition template="{!myTemplate}">
        <apex:define name="content">
            <apex:outputText escape="false" value="{!SitePage__c.Content__c}"/>
        </apex:define>
    </apex:composition>
</apex:page>

produces the following exception...

 

System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: SitePage__c.Content__c

 

...yet the following, modified version of the page - introducing a quite redundant variable - does work...

 

<apex:page showHeader="false" standardStylesheets="false" standardController="SitePage__c" extensions="pageController">
    <apex:variable var="c" value="{!SitePage__c.Content__c}"/>
    <apex:composition template="{!myTemplate}">
        <apex:define name="content">
            <apex:outputText escape="false" value="{!c}"/>
        </apex:define>
    </apex:composition>
</apex:page>

?


The controller should be of no concern but looks like this...

 

 

public class pageController {

    private final SitePage__c sitepage;
    public pageController(ApexPages.StandardController stdController) {
        this.sitepage = (SitePage__c)stdController.getRecord();
    }
    
    public  PageReference getmyTemplate()  {
        return  Page.tplDefault;
    }
}

 

We'd like to have some of our HTML-style comments actually render in the page vs. being stripped out by the VF compiler.  Is this possible?  

Hi,

I am trying to display idea records on a public page. For this, I created a controller where i query the idea object and list all the records on a visualforce page.

This works fine , when i open this visualforce page within salesforce. But making this page public, and viewing this page , it doesnt shows any results. The query returns 0 records, even if it has number of ideas available.

I gave "readonly" permission to ideas object for guest user profile. Am i missing something OR sites does not allow to query ideas from a guest user context. If they dont, what is the purpose of giving read only permission on guest user profile?

Any help is appreciated,

Thanks.