• Bibhu
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

I have a custom object with 4 record types.Each RT has a custom VF page and I want to replace the standard "View" so that each record type displays it's respective VF page.

 

I was using a formula based, page include methid (pasted below) which was working but I changed something and can't seem to fix it. It now renders the same VF page for both RT's.

 

<apex:page standardController="Sales_Tool__c">
<apex:outputPanel rendered="{!IF(Sales_Tool__c.RecordTypeId!='012S00000004SX5',true,false)}">
<apex:include pageName="Assessment_Form" />
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(Job_Aid__c.RecordTypeId!='012S00000004SX0',true,false)}">
<apex:include pageName="CompellingEvent_Form" /> 
</apex:outputPanel>
</apex:page>

Can someone please help me figure what's wrong this?I have a deadline to deploy this so any help would be appreciated. 

 

If you're wondering why I'm not using all apex class/page sample from the cookbook, the reason is I've inherited an sfdc environment where there poor test coverage for existing code and until that's fixed,I cant do anything new.

 

Apex page action may be the answer, I did toy around with that but I'm not too familiar with VF and couldn't quite get that to work. 

 

Thanks

HI All

 

I'm trying to display picklist values specific to a recordtype.

I have a visual force page which uses standard controller and an extension.


We are assigning the recordtype based on specific criteria with in the constructor.

http://developer.force.com/releases/release/Winter11/Visualforce+Support+for+Record+Types

As per the documentation, by using inputfield and version 20. I should be able to achieve what im trying to do.

But it is not working..

 

Im sure there is something wrong with my method.

 

Any pointers will be great help.

 

Thanks

Swapna

 

Hi,

 

I modified the Inline Account Hierarchy app by Force.com labs for a custom object and it works fine. But for users who have 'Read-only' acces permissions on the custom object, they are unable to view the page.

Can anyone help me with this. It is an urgent request.

 

Thanks in advance.

Hi,

 

I have a Visualforce page and a controller class.

Using "With Sharing" keyword, i am able to retrieve the records from the Custom object just as a Standard Salesforce functionality does.

Now my requirement is to retrieve all the Subordinate Roles for logged in User that should be displayed in drop-down.

There are more than 400 Roles in my org.

My Role stands 5th or 6th from the top.

 

Even if i use SOQL For loop to get all the Subordinate Roles, i am running in to Too many SOQL queries : 101.

Below is my code.

 

public method1()

         //get Subordinate Roles for the CurrentRole

        for(UserRole[] roleList : [Select id, name, parentroleid from UserRole ur Where ur.ParentRoleId :UserInfo.getUserRoleId() order by name])

        {
            for(UserRole role: roleList)
            {
                currentUserSubDetails.add(role);//Add to list
            }

         }

        

        //Retrieve Subordinate roles for each Role

        for(Integer i=0; i<currentUserSubDetails.size(); i++)
        {
            getRolesAtDeeperLevel(currentUserSubDetails[i]);
        }


 }

 

   private void getRolesAtDeeperLevel(UserRole ur)
    {
        for(UserRole[] roleList : [select id, name, ParentRoleId from UserRole where ParentRoleId = :ur.id order by name])
            for(UserRole role: roleList)
            {
                currentUserSubDetails.add(role);
            }
    }

Can anyone suggest me a solution?

 

Regards OnDem

Message Edited by OnDem Dev on 07-09-2009 10:28 AM