• Rajkumar Venkat
  • NEWBIE
  • 10 Points
  • Member since 2011
  • Solution Architect


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 15
    Replies
Limitation:
Recently I came across the issue where customer community does not have option to disable the standard page layout view for community users.
 
Scenerio:
Like https://xy.force.com/portal/pagename?Id=18digitid - this will be correct url for customer community users.
 
Someone changing the url to valid salesforce url
https://xy.force.com/portal/18digitid  - this is going to standard customer community layout which has all the standard settings.
 
Issue:
Some customer does not want to allow the community users to view standard page layout. As said there are no standard options to disable the page layout for community users.
 
Limitation:
Recently I came across the issue where customer community does not have option to disable the standard page layout view for community users.
 
Scenerio:
Like https://xy.force.com/portal/pagename?Id=18digitid - this will be correct url for customer community users.
 
Someone changing the url to valid salesforce url
https://xy.force.com/portal/18digitid  - this is going to standard customer community layout which has all the standard settings.
 
Issue:
Some customer does not want to allow the community users to view standard page layout. As said there are no standard options to disable the page layout for community users.
 
Can't seem to get sforce.one.editRecord to work.... anyone have any thoughts as to what I can try? Litterly just passing it the id in the standard controller.
Can some one Guide me How to redirect a page to VisualForce Tab with name Appl_Cntcs

I am trying the below but it is not opening

PageReference pr = new PageReference('/Appl_Cntcs/o');
      pr.setRedirect(true);
      return pr;

If I use the Visual force page it is redirecting but I am unable to see the tab hence need some help to redirect and also see the TAB.
  • April 13, 2015
  • Like
  • 0

Hi
I created a community on Salesforce. I customized the landing page to have login page. 
I am not able to log in to salesforce using  my developer log-in credentials on to the community page. How can I overcome this problem?
Thanks
Best
 

  • April 13, 2015
  • Like
  • 0
Hi All,
I need to display 3columns records as shown below in attached snap
Requirement page
Here "Subscription Name" and "Status" field/column are from same object called "Subscription" API name "csord__Subscription__c" and one field"Billing Account Number"(API Name-Billing_Account_Number__c) is from other object called "Service" API name "csord__Service__c".
Currently i am able to display fields/columns from Subscription object but not able to display the Biiling account number field from Service object.
I am attaching my VF and controllers codes as;
public class ControllerWrapper{
private Set<Id> selectedContactIds;

//Our collection of the class/wrapper objects 
public List<wrapSubscription> wrapSubscriptionList {get; set;}
public List<csord__Subscription__c> selectedSubscriptions{get;set;}
public Boolean isCancel{get;set;}
public string accountid;
public String selectedActions{get;set;}
public Date dat {get;set;}

    
//Constructor class   
public ControllerWrapper(){
    accountid=ApexPages.currentPage().getParameters().get('id');
        if(wrapSubscriptionList == null) {
           wrapSubscriptionList= new List<wrapSubscription>();
            for(csord__Subscription__c s: [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid LIMIT 20]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapSubscriptionList.add(new wrapSubscription(s));
            }
        }
    }
    
public List<SelectOption> getActionsOptions() {
        List<SelectOption> actionOptions = new List<SelectOption>();
        actionOptions.add(new SelectOption('','-None-'));
        actionOptions.add(new SelectOption('Take Over','Take Over'));
        actionOptions.add(new SelectOption('Invoice Switch','Invoice Switch'));
        actionOptions.add(new SelectOption('Move','Move'));
        /*countryOptions.add(new SelectOption('Germany','Germany'));
        countryOptions.add(new SelectOption('Ireland','Ireland'));*/
 
        return actionOptions;
}
   


public ApexPages.StandardSetController setCon {
get {
    if(setCon == null) {
         setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
            [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid ]));
                             }
                        return setCon;
                }
        set;
    }
public List<csord__Subscription__c > getWrapSubscriptionList() {
         
          setCon.setpagesize(20);
         setCon.setpageNumber(1);
         return (List<csord__Subscription__c >) setCon.getRecords();
    }


//Method for obtaining current page no.
public Integer getPageNumber(){
 
        return this.setCon.getPageNumber();
 
    }
    

 

//Function returns the total no pages 
Public Integer getTotalPages(){
 
        Decimal totalSize = this.setCon.getResultSize();
        Decimal pageSize = this.setCon.getPageSize();
 
        Decimal pages = totalSize/pageSize;
 
        return (Integer)pages.round(System.RoundingMode.CEILING);
    }             
                  

     
//Function to call Proceed button    
public void processSelected() {
    selectedSubscriptions = new List<csord__Subscription__c>();
 
        for(wrapSubscription wrapSubscriptionObj : wrapSubscriptionList) {
            if(wrapSubscriptionObj.selected == true) {
                selectedSubscriptions.add(wrapSubscriptionObj.sub);
            }
        }
    }
    
//Function to process the Cancel Button
public PageReference cancel(){
        return new PageReference('/'+accountid);
    }
    
//Method for calling Next Button
public void next(){

    if(this.setCon.getHasNext())
        this.setCon.next();

    }

//Method for calling Previous Button
public void previous(){

    if(this.setCon.getHasPrevious())
        this.setCon.previous();

    }
    
    
 
                         
 
// This is our wrapper/container class. In this example a wrapper class contains both the custom object Subscription and a Boolean value
public class wrapSubscription {
        public csord__Subscription__c sub {get; set;}
        public Boolean selected {get; set;}
 
        public wrapSubscription(csord__Subscription__c s) {
            sub = s;
            selected = false;
        }
    }
}
<apex:page docType="html-5.0" controller="ControllerWrapper" sidebar="false" showHeader="false">
    <script type="text/javascript">
        function selectAllCheckboxes(obj,receivedInputID){
            var inputCheckBox = document.getElementsByTagName("input");
            for(var i=0; i<inputCheckBox.length; i++){
                if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                    inputCheckBox[i].checked = obj.checked;
                }
            }
        }
    </script>
    <apex:form >
    <apex:pageBlock >
        <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
        <!-- <apex:outputText value="{!selectedActions}" label="You have selected:"/>-->
        <!--<apex:outputText label="Select the Action:"/>-->
        Select the Action:
        <!--<apex:outputPanel>-->
          <apex:selectList value="{!selectedActions}" multiselect="false" size="1">
                <apex:selectOption itemValue="Take Over" itemLabel="Take Over"/>
                <apex:selectOption itemValue="Invoice Switch" itemLabel="Invoice Switch"/>
                <apex:selectOption itemValue="Move" itemLabel="Move"/>
            </apex:selectList>
            <!--</apex:outputPanel>-->
            </apex:pageBlockSectionItem>
           </apex:pageBlockSection> 
           <apex:PageBlockSection >
            <apex:pageBlockSectionItem >
                Date: <apex:input type="date" value="{!dat}" required="true" />
                
            </apex:pageBlockSectionItem>
            <!--<apex:input value="{!myDate}" id="theTextInput" type="date"/>-->
        </apex:pageBlockSection>
    </apex:pageBlock>

    
        <apex:pageBlock title="Select Subscription"  >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Proceed " action="{!processSelected}" />
                <apex:commandButton value="Cancel" action="{!cancel}" immediate="true" />
            </apex:pageBlockButtons>
       <apex:pageblockSection title="Subscriptions" collapsible="false" columns="1" >
             <apex:pageBlockTable value="{!wrapSubscriptionList}" var="subWrap">
                    <apex:column >
                        <apex:facet name="header">
                            <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')" />
                        </apex:facet>
                        <!--<apex:inputCheckbox value="{!subWrap.selected}" id="inputId"/>-->
                                <apex:inputCheckbox value="{!subWrap.selected}" id="inputId" disabled="{!NOT(subWrap.sub.csord__Status__c=='Active')}" />
                    </apex:column>
                    
                    <!--<apex:column value="{!subWrap.sub.Name}" />-->
                    <apex:column headerValue="Subscription Name" > 
                        <!--<apex:commandLink value="{!subWrap.sub.Name}" action="/{!subWrap.sub.Id}"/>-->
                       <apex:outputLink value="/{!subWrap.sub.Id}" target="_blank"> {!subWrap.sub.Name} </apex:outputLink>
                   </apex:column>
                     <apex:column value="{!subWrap.sub.csord__Status__c}" />
                    <apex:column value="{!subWrap.sub.csord__Account__c}" />
                </apex:pageBlockTable>
                </apex:pageblockSection>
             <apex:commandButton rendered="{!setCon.hasPrevious}" value="first" action="{!setCon.first}"/>
            <apex:commandButton rendered="{!setCon.hasPrevious}" value="Previous" action="{!setCon.previous}"/>
            <apex:outputLabel value=" (page {!pageNumber} of {!totalPages})"/>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) < setCon.ResultSize}" value="{!setCon.pageNumber * setCon.pageSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) >= setCon.ResultSize}" value="{!setCon.ResultSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:commandButton rendered="{!setCon.hasNext}" value="next" action="{!setCon.next}"/>
            <apex:commandButton rendered="{!setCon.hasNext}" value="last" action="{!setCon.last}"/>

     <apex:pageBlock />
                
                
                <apex:pageblockSection title="Selected Subscriptions" collapsible="false" columns="1" >
                   <apex:pageBlockTable value="{!selectedSubscriptions}" var="c" id="table2" title="Selected Subscriptions" width="100%">
                    <!--<apex:column value="{!c.Name}" headerValue="Subscription Name"/>-->
                    <apex:column headerValue="Subscription Name" > 
                        <apex:commandLink value="{!c.Name}" action="/{!c.Id}" target="_blank"/> 
                      </apex:column> 
                    <apex:column value="{!c.csord__Status__c}" headerValue="Status"/>
                    <apex:column value="{!c.csord__Account__c}" headerValue="Account"/>
                </apex:pageBlockTable>
            

            </apex:pageblockSection>
        </apex:pageBlock>
    </apex:form>
 
</apex:page>

Note-"Subscription" object is master and "Service" is child.
please help me out and fine tune the code wherever possible.
I nee dto resolve this asap.
 
Hi,
I have List<User> and its count.
I am iterating over a user count to display outputPanels for each and every user.
How to dynamically assign the value to "Rendered" attribute. i.e. In place of ABC in below example.
for eg.

<apex:repeat value="lstuser" var="u">
<apex:repeat value="list2" var="v">
<apex:outputPanel rendered="{!If(v.Name == 'ABC', true, false)}">
</apex:outputPanel>
</apex:repeat>
</apex:repeat>

Thanks.
  • April 13, 2015
  • Like
  • 0
Hi

How to remove the hyperlink in the ‘Lookup’ filed for particular profile Name only. I have used the java script and get the Element ID to using the style in Java script, but I can't remove the Hyperlink in that Lookup field. Kindly share your knowledge about this.
 
My code : var x = document.getElementsById("lookupa05f0000006ljSZ00ND0000005EdfF").style.pointerevents="none";
 
Thanks in Advance 
Just starting out to develop a custom sync feature to replace the standard opportunity<->Quote sync.  For the UI changes we are thinking to implement a custom button on quote object but would want the label to change based on whether or not the quote is already sycning or not - very similar to how the standard sync button label changes.

Any suggestions on how we might implement this ?

I am farily new to Apex, Visualforce coding.

  • June 02, 2014
  • Like
  • 0

How to remove Action column in <apex:relatedList> in VF Page without changing User permission ?

Page is: 

<apex:detail relatedList="false"/>
<apex:relatedList list="Engineering_Deployment_Elements__r"/>

 

I have 4 sites pages in which i reference documents (in a shared folder to all users) stored as externally available images. when viewing the sites pages from the url no image is displayed. when viewing from inside the app the images appear. I have done this previously and had no problems. any ideas are welcome.

Hi

We have implemented logout functioanlity by adding script "/secur/logout.jsp" to visualforce page for force.com sites. But whenever we logout, it is going to Sales force logout page and then going to login page. As per requirement we dont want to show sales force logout page. please let me is there any java script or other scipt to change the behavior.

 

Thanks,

Ravikumar Katragunta

  • June 07, 2011
  • Like
  • 0

I have been given the task of creating a list of our Queues and the members that belong to them. After playing around in the schema browser it seems that this meta-data has enough exposure to be able to generate this list with a soql query. Is there anybody out there who has done this before, and could point me in the right direction.

 

Thanks,

Andy