• developerTeam
  • NEWBIE
  • 55 Points
  • Member since 2013

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

Hi ,

Am creating a VF Page for New/Edit page for my CustomObject and With the Following Controller am getting:

Visualforce Error

System.QueryException: List has no rows for assignment to SObject 

 

Class :

public class NewColorPaletteController{

  public Color_Palette_To_Color__c record;    
  public string b{get; set;} 

  public NewColorPaletteController() {
      record= [select id,Name,Color_Palette__c,Color__c FROM Color_Palette_To_Color__c where id=:ApexPages.currentPage().getParameters().get('Id')];
    }

  Public Color_Palette_To_Color__c  getRecord()
  { return record;
  }
    
  Public PageReference SaveMethod(){
       try{
            update record;
        }
       catch(exception e){
      //      // handle the exception
      }
        return new PageReference('/apex/relatedListColorPalette?id='+record.Color_palette__c);
  }

  Public PageReference cancelMethod() {
        return null;
    }

}

 Please provide Solution for this Error.

 

-Thank you.

Hi,

 

I have Visualforce Page with a TabPanel of 5 Tabs.

In Each tab it contains the Custom Object and Custom Listviews  ..... for all Objects we had overrided the New by rendering it in an Outputpanel with an <apex:iframe> 

To maintain Tab & Sub-Tab Navigation for a user, I am trying to acheive SFDC New, Detal , Edit etc Standard Layout with in the Sub Tab by using Iftrame...

 

We are Using the Following Code:

 

<div id="pageBlock">  
   <apex:outputPanel id="selectValues" style="font-size:50px; background-color:#FFFFFF;">
      <apex:pageBlock rendered="{!hide}" id="selectPub2" >
         <apex:commandLink value="BackToList"  action="{!Invokehide}"  rerender="selectText,selectValues"  style="font-size:18px; font-style:normal;font-weight:normal; font-family:Arial,Helvetica,sans-serif; width:70px;"  styleClass="btn" />
        <div id="frameScale ">
            <apex:iframe src="{!https://salesforce-instance/id?isdtp=vw}" frameborder="false" scrolling="true" title="Iframe" id="frame" height="450px" width="1140px;"/>        </div>                          
     </apex:pageBlock>
   </apex:outputPanel> 
</div> 

With this Now, we are able to get the New CustomObject page in Iframe But after Saving of a record ....... in that Record detail We are not able to Create Child CustomObject records.....  When Click the "New Child CustomObject"  the Button is not working not displaying anything.... If We use   ?isdtp=mn or ?isdtp=lt  IN iFRAME ,, We are able to Create Child records through"New Child CustomObject"  Button. But the layout is of Old Salesforce version if we use ?isdtp=lt or mn

 

How To make the the child New record Button work in Parent Record Detail in the apex:iframe when use URL parameter ?isdtp=vw 

 

Please Help me in Solving this Issue.

-ThankYou

How to change the Font-size in <apex:iframe>   ??

Hi, 

am Using <apex:iframe>  in my VfF page for showin a Custom Object Detail Page(Standard Salesforce's Page) in my VF page. I want to Change/Customize the font-size or look of the Custom Object Detail Page which is present in my <apex:iframe>.

I had used div tag which are of no use to change the Font-size or type only the Difference is shown on Height or Width of iframe.

 

My Code used is:

<div class="outputpanel"> 
<apex:iframe src="{!b}" frameborder="false" scrolling="true" title="New Color" height="500" width="100%"/>
</div>  

am Passing the value of b as following:

b= 'https://cs5.salesforce.com/'+ p.getKeyPrefix() +'/e'+'?isdtp=vw';

Just i need to Increase the Content size/Font-size in the Iframe... help me!

Hi,

 

I Need a Custom Clone Button which when clicked Should have Same functinality of Standard Clone Button, but only Name Should be Updated. Such as for Example

 

I have CustomObject__c with fileds like ID,Name,Custom_BatchNo__c, Custom_Type__c..... etc

As on Detail page of a CustomObject__c record which has Clone Button which when clicked gets all the Fields names pre populated with Same Name's of the earlier Record.........

Now,

Here I need the Name feild to be changed as  Name: Clone of Record

 

How to Achieve this Scenario.... am trying with Custom Button with Javascript.

-Thank you

 

Am Facing an VisualForce  Error

" common.formula.FormulaParseException: Syntax error. Found 'if'  " 

When I click the New CutomObject Button am getting this Error..... it is due to the value="{!if(ActiveTab != null, ActiveTab, 'tab1')}"  attribute of  my  <apex:TabPanel>

check 

<apex:tabPanel switchType="client" id="tabpanel" value="{!if(ActiveTab != null, ActiveTab, 'tab1')}" >

 

Which is not allowing to redirect to New record page , when is use a Fomula in Action attribute 

<apex:commandButton value="New PortofOrigin" action="{!URLFOR($Action.Port_of_Origin__c.New)}"> OR Even directly with URL link 

<apex:commandButton value="New PortofOrigin" action="https://cs5.salesforce.com/a0R/e?retURL=%2Fa0R%2Fo" >

 

My Visualforce Page:

<apex:page showHeader="false" id="thePage" controller="extensionController1">
    <script>
        function setCookie(c_name,value)
        {
            var exdate=new Date();
            exdate.setDate(exdate.getDate() + 99);
            var c_value=(escape(value) + : "; expires="+exdate.toUTCString());
            document.cookie=c_name + "=" + c_value;
        }
    </script>
<apex:form id="form">
<apex:actionFunction name="setTab" onComplete="return false;" rerender="tabpanel">
<apex:param name="activeTab" assignTo="{!ActiveTab}" value="" />
</apex:actionFunction>

<apex:tabPanel switchType="client" id="tabpanel" value="{!if(ActiveTab != null, ActiveTab, 'tab1')}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<!-- TAB ONE STARTS -->
<apex:tab title="tab1" label="tab1" id="object1" name="tab1" ontabenter="setCookie('apex__counter','tab1');" switchType="client">
<apex:message title="Error"/>

<apex:pageBlock title="tab1" mode="edit" tabStyle="Sourcing__tab">
  <!-- NEW BUTTON WHICH WHEN CLIKCED FOR -->

        <apex:pageBlockButtons location="top" style="padding-left:70px;">
         <apex:commandButton value="New CustomObject1" action="{!URLFOR($Action.CustomObject1__c.New)}" style="font-size:12px;font-weight:bold;width:120px;"/>
        </apex:pageBlockButtons> 
       
</apex:pageblock>
</apex:tab>
<!-- TAB TWO STARTS -->

<apex:tab title="tab2" label="tab2" id="object2" name="tab2" ontabenter="setCookie('apex__counter','tab2');" switchType="client">
<apex:message title="Error"/>

<apex:pageBlock title="tab1" mode="edit" tabStyle="Sourcing__tab">
  <!-- NEW BUTTON WHICH WHEN CLIKCED FOR -->

        <apex:pageBlockButtons location="top" style="padding-left:70px;">
         <apex:commandButton value="New CustomObject2" action="{!URLFOR($Action.CustomObject2__c.New)}" style="font-size:12px;font-weight:bold;width:120px;"/>
        </apex:pageBlockButtons> 
       
</apex:pageblock>
</apex:tab>
</apex:tabpanel>
</apex:form>
</apex:page>

 The Controller is:

public with sharing class extensionController1 {
    
    public string ActiveTab  { get; set; }

    public extensionController1()
    {
        Cookie counter = ApexPages.currentPage().getCookies().get('counter');

        // If this is the first time the user is accessing the page,   
        // create a new cookie with name 'counter', an initial value of '1',   
        // path 'null', maxAge '-1', and isSecure 'false'.   
            if (counter ==null) {
                counter = new Cookie('counter','tab1',null,999,false);
                // Set the new cookie for the page  
                ApexPages.currentPage().setCookies(new Cookie[]{counter});
            } else {
        // If this isn't the first time the user is accessing the page  
        // create a new cookie, incrementing the value of the original count by 1  
            
                ActiveTab = String.valueOf(counter.getValue());
            }
            system.debug('@@ActiveTab: ' + ActiveTab);
    }
}

 Please provide a Solution to this,Such that I can use the last selected tab Functionality and create new records from the tabpanel.

-Thank you

Hi,

 

Am facing This Viusalforce Error "common.formula.FormulaParseException: Syntax error. Found 'if'

When I click the "New PortofOrigin" Button of my VF page , Instead of New Record page Am facing an Visualforce Error.......... The code is Below

I have Used an If condition in Value attribute of my TabPanel , I thought this was the reason for Error ...So, resolve this issue and suggest me the way to call an New Record using Formula.

 

<apex:form id="form">
<apex:actionFunction name="setTab" onComplete="return false;" rerender="tabpanel">
<apex:param name="activeTab" assignTo="{!ActiveTab}" value="" />
</apex:actionFunction>

<apex:tabPanel switchType="client" id="tabpanel" value="{!if(ActiveTab != null, ActiveTab, 'tab1')}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<!-- TAB ONE STARTS -->
<apex:tab title="PortofOrigin" label="PortofOrigin" id="object1" name="tab1" ontabenter="setCookie('apex__counter','tab1');" switchType="client">
<apex:message title="Error"/>

<apex:pageBlock title="PortofOrigin" mode="edit" tabStyle="Sourcing__tab">
  <!-- NEW BUTTON WHICH WHEN CLIKCED FOR -->

        <apex:pageBlockButtons location="top" style="padding-left:70px;">
         <apex:commandButton value="New PortofOrigin" action="{!URLFOR($Action.Port_of_Origin__c.New)}" style="font-size:12px;font-weight:bold;width:120px;"/>
        </apex:pageBlockButtons> 
       
        <apex:pageBlockTable value="{!PortofOriginresults}" var="PortofOrigin" id="PortofOrigintblResults">
           <apex:column > 
           <apex:facet name="header">
            <apex:outputPanel style="font-size:13px;">PortofOrigin Name</apex:outputPanel>
           </apex:facet>
           <apex:outputLink value="/{!PortofOrigin.id}" id="eventlink" >{!PortofOrigin.Name} </apex:outputLink>  
          </apex:column>
        </apex:pageBlockTable>
      </apex:pageBlock>

 -Thank you.

 

Hi,

I had developed a Visualforce page which UI looks similar to a ListView with a Search Functionality. My  Page has Executed very well but has Several Issues in UI. I had wrote my Issues after the code. Please check Below

 

<apex:page controller="PortofOriginController" showHeader="false" sideBar="false" tabStyle="Sourcing__tab" id="pg">
<head>
 <apex:message title="Error"/>
 <Style>
  .Body 
    {font-size:14px;font-family:'Calibri';}
 </Style>
 <Script type='text/javascript'>
  function noenter(ev)  {
        if (window.event && window.event.keyCode == 13 || ev.which == 13) {
            doSearchAF();
            return false;
         } else {
              return true;
         }
     }
  function writeDB()
{
   location.reload( 0 );
   return false;
}
 </Script>
</head>
<body>
<apex:form >  
   <c:Sectionheader iconsrc="{!$Resource.Port_Of_Origin}" title="Sourcing" subTitle="Port of Origin" PrintUrl="https://cs5.salesforce.com/a0R/x?fcf=00BO0000000WWES&rolodexIndex=-1&page=1" help="https://help.salesforce.com/htviewhelpdoc?id=co_view.htm&siteLang=en_US"/>
   <apex:actionRegion rendered="true">  
    <apex:outputPanel id="top" layout="block" style="
    border: 0 none;
    font-family: Calibri;
    height: 24px;
    float: right;
    margin-top: -25px;  
    width: 270px;">
      <apex:outputLabel value="Search" style="font-weight:Bold;font-family:'Calibri';padding-right:10px;font-size:14px;" for="txtSearch"/>    
      <apex:inputtext value="{!searchString}" id="txtSearch" onkeypress="return noenter(event);" />
        <span style="padding-left:5px; ">
         <apex:commandbutton id="btnGo" value="Go!" action="{!Search}" rerender="searchResults" status="blockUI" style="width:40px;"/>
        </span>
    </apex:outputPanel>
    <apex:outputPanel id="pnlSearchResults" style="margin:10px;overflow-Y:auto;" layout="block">             
       <apex:pageBlock id="searchResults" title="Port of Origin" mode="edit" tabStyle="Sourcing__tab">
       
        <apex:pageBlockButtons location="top" style="padding-left:70px;">
        <apex:commandButton action="{!URLFOR($Action.Port_of_Origin__c.New)}" value="New Port of Origin" id="blockUI" style="font-weight:bold;width:120px;"  />       
        </apex:pageBlockButtons> 
       
        <apex:pageBlockTable value="{!results}" var="a" id="tblResults">
       
          <apex:column >
            <apex:facet name="header">
               <apex:outputPanel >Action</apex:outputPanel>
            </apex:facet>
            &nbsp;<apex:outputLink title="Edit" value="/{!a.id}/e?retURL=/apex/{!$CurrentPage.Name}" 
            style="font-size:12px; color: #015BA7;font-weight: normal;text-decoration: none;">Edit</apex:outputLink>&nbsp;|&nbsp;             
           <apex:commandLink id="idToDel" reRender="searchResults" title="Delete" action="{!deleteMethod}" immediate="true" onclick="if(!confirm('Are you sure you want to delete ?')) return false;" oncomplete="writeDB();" style="font-size:12px;color: #015BA7;font-weight: normal;text-decoration: none;">Del
             <apex:param value="{!a.Id}" name="idToDel" assignTo="{!delId}"/>
            </apex:commandLink>  
          </apex:column>   
               
          <apex:column > 
           <apex:facet name="header">
            <apex:outputPanel style="">Port of Origin Name</apex:outputPanel>
           </apex:facet>
           <apex:outputLink value="/{!a.id}" id="eventlink" >{!a.Name} </apex:outputLink>  
          </apex:column>

        </apex:pageBlockTable>
       </apex:pageBlock>	
     </apex:outputPanel>
   </apex:actionRegion> 
  </apex:form>
 </body>        
</apex:page>

 

1. As for Search I have a input text box with a  command Button "Go!" i.e search Button  the problem here is when is Enter the search text and Press Enter key in my KeyBoard the Go button is not invoked , instead the New Button of below of PageBlock is being Invoked. 

It works very fine when enter search text and Manually inovkes "Go!" Button or using Mouse or Tab and Enter key.

So I want Only "Go!" Button to be invoked  after entering searchtext by Pressing Enter key.

 

2. In PageblockTable the 1st column has Edit and Delete command links. When I click the DEL command link the Entire page is being refreshes or reloaded with record being deleted... I want only a certain portion or a Output Panel or PageBlockTable to only RELOAD or REFRESHED, leaving the entire page remain Constant only certain page to be reloaded similar to inbox of gmail ... Intially I used Rendered but failed to get the required scenario.

 

-Thank you

Hi,

Am facing Trouble while Placing    <apex:include pageName="VFpage1" />    in 3 or more Tabs of TabPanel in my Page.

Below is my code :

<apex:page sidebar="false" showheader="true" title="Test Page">
<apex:tabPanel switchType="client" id="theTabPanel" >
  
  <apex:tab label="Label 1" name="oneTab" id="tab1" >
    <apex:include pageName="VfPage1" />   
  </apex:tab>
  
  <apex:tab label="Label 2" name="twoTab" id="tab2" >
    <apex:include pageName="VfPage2" />   
  </apex:tab>
  
  <apex:tab label="Label 3" name="threeTab" id="tab3" >
    <apex:include pageName="VfPage3" />   
  </apex:tab>
  
 </apex:tabPanel>
</apex:page>

My Problem is the UI, In the 1st Tab "Label 1" itself am Able to see all the 3 pages VfPage1, VfPage2 & VfPage3 within in the Label1 tab itself and

When I click the 2nd Tab the included page appears like  Float: right; at right corner and the Tabpanel is moved to another i.e Left corner in Center .. But the 3rd Tab is Perfect.

 

How to settle this UI issues intially i tried all the StyleClasses, CSS .... Am missing somewhere. Please find me a Solution.

-Thankyou

Hi,

Am new to salesforce, I had customized my org with my requirements, But am facing some problem:

 

I have a Custom JunctionObject__c  which has 2 fileds

1. CustomField1__c master-detail relation to CustomObject1__c and Similarly  

2. CustomField2__c master-detail relation to CustomObject2__c. 

 

I had Customized the new edit page to VF1 n used StandardController=”JunctionObject__c ” Extension="testController"

And overriden the "New" button of JunctionObject__c  to VF1.

 

So when we go from CustomObject1__c (PARENT) record we can see the related block JunctionObject__c , NOW when I click the "NEW" button the VF! appears Good. and I insert the data and click Save Button am going to detail page of JunctionObject__c,

But I need to be redirected to the CustomObject1__c detail page of that id. 

Here's below is the VF1 page :

<apex:page standardController="JunctionObject__c" extensions="TestController">
<apex:form id="myForm">  
 <apex:pageBlock title="JunctionObject Edit" mode="edit">
   <Apex:pageBlockButtons >
    <apex:commandButton action="{!save}" value="Save"/>   
    <apex:commandButton action="{!cancel}" value="Cancel"/>   
   </Apex:pageBlockButtons>
   <apex:pageBlockSection title="JunctionObject Information" columns="1">
     <apex:inputField  value="{!JunctionObject__c.CustomObject1__c}" />  // this helps me in pre-populating the value from Parent. 
    <apex:inputField value="{!JunctionObject__c.CustomObject2__c}" /> 
   </apex:pageBlockSection> 
  </apex:pageBlock>
 </apex:form>
</apex:page>

and Controller i.e. Extension is:

public class testController {

    public JunctionObject__c record;
    ApexPages.StandardController con;

    public testController (ApexPages.StandardController controller) {
    this.con = Controller; 
    system.debug( con.getRecord() );
        try { 
        this.record = [select id,Name,CustomField1__c,CustomField2__c from JunctionObject__c  where id = :con.getRecord().id limit 1];
        } 
        catch( Exception ee) { 
            this.record = new JunctionObject__c (); 
        }
    }
}

I didn't write any code for save Method, Please suggest me the code for Save Method which saves the object and redirects it to the parent CustomObject1__c.

 

Please help me in Save Method i.e. Code which saves the object and redirects it to the parent CustomObject1__c.

i.e. a Save button when clicked saves the inputvalues to the JunctionObject and Redirectes straight away to the previous CustomObject1 from where it came.

 

-ThankYou.

Hi,

 

Am working on Tabs in Tabpanel of Visualforce to set all my Objects as Tabs in VF page, When I click any tab it Represents a CustomObject__c in that page I had used the Following Code:

 

<apex:tabpanel>
<apex:tab title="CustomObject" label="CustomObject" name="name1" id="tabOne"> 
<apex:sectionHeader title="Heading" subtitle="SubHeading" > 
 <apex:ListViews type="CustomObject__c" />
</apex:tab>
<apex:tab title="CustomObject1" label="CustomObject1" name="name2" id="tabTwo"> 
<apex:sectionHeader title="Heading" subtitle="SubHeading" > 
 <apex:ListViews type="CustomObject1__c" />
</apex:tab>
</apex:tabpanel>

 But I want the features of ENHANCED LISTS in my VF page So I had replaced the

 <apex:ListViews type="CustomObject__c"/> to 

<apex:enhancedList type="CustomObject__c"/>  

 

With this Change Am facing Issues such as "Loading on the screen" continously but am not able to see the list. 

1. How to use EnhancedList view in tabpanel which has more than 3 Tabs ?

2. Also How to insert Search Functionality in apex: ListViews or EnhancedListViews ?

 

-Thankyou

Hi,

 

Am new to salesforce, I had customized my org with my requirements, But am facing some problem:

I have a Custom JunctionObject__c  which has 2 fileds  CustomField1__c master-detail relation to CustomObject1__c and Similarly  CustomField2__c master-detail relation to CustomObject2__c. 

 

I had Customized the new edit page to my own VF page i.e. VF1 n used StandardController=”JunctionObject__c ”. 

And overriden the "New" button of JunctionObject__c  to VF1.

 

So when we go from CustomObject1__c (PARENT) record we can see the related block JunctionObject__c , NOW when I click the "NEW" button the VF! appears Good. and I insert the data and click Save Button am going to detail page of JunctionObject__c,

But I need to be redirected to the CustomObject1__c detail page of that id. 

Here's below is the VF1 page :

 

<apex:page standardController="JunctionObject__c" extensions="testController">
<apex:sectionHeader title="JunctionObject Edit"  subtitle="New JunctionObject" />
<apex:form id="myForm">  
 <apex:pageBlock title="JunctionObject Edit" mode="edit">
   <Apex:pageBlockButtons >
    <apex:commandButton action="{!save}" value="save"/>   
    <apex:commandButton action="{!cancel}" value="cancel"/>   
   </Apex:pageBlockButtons>
   <apex:pageBlockSection title="JunctionObject Information" columns="1">  <br/>
  <apex:pageBlockSectionItem >
   <apex:outputLabel value="CusomField1"/>
     <apex:inputField  value="{!var.CustomObject1__c}" />
    </apex:pageBlockSectionItem> <br/> 
    <apex:pageBlockSectionItem > 
   <apex:outputLabel value="CusomField2"/> 
    <apex:inputField value="{!var.CustomObject2__c}" /> 
   </apex:pageBlockSectionItem> 
   </apex:pageBlockSectionItem> 
   </apex:pageBlockSection> 
  </apex:pageBlock>
 </apex:form>
</apex:page>

 And my TestController is as Follows:: 

 

public class testController {

public JunctionObject__c var {get;set;}
 
  public testController(ApexPages.StandardController controller) {
    var= new JunctionObject__c();
  }
 
}

 

I didn't write any code for save Method, Now Please suggest the code for Save Method which saves the object and redirects it to the parent CustomObject1__c.

I.e. a Save button when clicked saves the inputvalues to the JunctionObject and Redirectes straight away to the previous CustomObject1 from where it came.

Would be very helpful, if provided the code.

 

Thankyou.

 

Hi ,

 

iam facing some problem while placing Enhanced List in Tab Panel .....

 

It Show's Loading on the screen continously but am not able to see the list 

 

help us.

<apex:tabPanel switchType="client" selectedTab="name1" id="theTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">
<apex:tab title="Color Pallette" label="Color Pallette" name="name1" id="tabOne" reRender="Color_Palette" style="font-size:12px;font-style:normal;font-family:'Calibri';width:120px; " >

<apex:sectionHeader title="ColorPallette" subtitle="Summary"  />

<apex:enhancedList type="Color_Palette__c" height="500" />

 </apex:tab>

thankyou 

I am converting the tables in my sql server database  to force.com as Objects and there are some tables which has relationship with views,

So how to show these on force.com

Hi all, 

I have around 70-90 objects(SUB MENU's) in force.com which are catogorized into 5 divisions (MAIN MENU TABS), So our requirement is to have " 5 tabs as MAIN MENU and the objects which are generally considered as TABS as SUB MENU's"

How this can be acheived in force.com ?

So that, it can be clear and understandable for our clients.  

Hi,
Am developing an APP in force.com and trying to deploy in APPEXCHANGE, before to that in Initial Stage, for Object/Field creation which Profile to select, like DEFAULT ON/OFF to all or selected profiles. We are targeted to a huge number of USERS to our APPLICATION, So which Selected or all profiles to be used in our development process. or It doesn't matters 
Thanks in Advance!

Hi, we are a TEAM of 3 are developing a application in dev org. We are not able get the complete access to the app, by creating USERS in an org, wats the Standard way to work in parallel & develop an application with both admin & development work.

Thanks in Advance!

Hi ,

Am creating a VF Page for New/Edit page for my CustomObject and With the Following Controller am getting:

Visualforce Error

System.QueryException: List has no rows for assignment to SObject 

 

Class :

public class NewColorPaletteController{

  public Color_Palette_To_Color__c record;    
  public string b{get; set;} 

  public NewColorPaletteController() {
      record= [select id,Name,Color_Palette__c,Color__c FROM Color_Palette_To_Color__c where id=:ApexPages.currentPage().getParameters().get('Id')];
    }

  Public Color_Palette_To_Color__c  getRecord()
  { return record;
  }
    
  Public PageReference SaveMethod(){
       try{
            update record;
        }
       catch(exception e){
      //      // handle the exception
      }
        return new PageReference('/apex/relatedListColorPalette?id='+record.Color_palette__c);
  }

  Public PageReference cancelMethod() {
        return null;
    }

}

 Please provide Solution for this Error.

 

-Thank you.

How to change the Font-size in <apex:iframe>   ??

Hi, 

am Using <apex:iframe>  in my VfF page for showin a Custom Object Detail Page(Standard Salesforce's Page) in my VF page. I want to Change/Customize the font-size or look of the Custom Object Detail Page which is present in my <apex:iframe>.

I had used div tag which are of no use to change the Font-size or type only the Difference is shown on Height or Width of iframe.

 

My Code used is:

<div class="outputpanel"> 
<apex:iframe src="{!b}" frameborder="false" scrolling="true" title="New Color" height="500" width="100%"/>
</div>  

am Passing the value of b as following:

b= 'https://cs5.salesforce.com/'+ p.getKeyPrefix() +'/e'+'?isdtp=vw';

Just i need to Increase the Content size/Font-size in the Iframe... help me!

Hi,

 

I Need a Custom Clone Button which when clicked Should have Same functinality of Standard Clone Button, but only Name Should be Updated. Such as for Example

 

I have CustomObject__c with fileds like ID,Name,Custom_BatchNo__c, Custom_Type__c..... etc

As on Detail page of a CustomObject__c record which has Clone Button which when clicked gets all the Fields names pre populated with Same Name's of the earlier Record.........

Now,

Here I need the Name feild to be changed as  Name: Clone of Record

 

How to Achieve this Scenario.... am trying with Custom Button with Javascript.

-Thank you

 

Hi,

 

Am facing This Viusalforce Error "common.formula.FormulaParseException: Syntax error. Found 'if'

When I click the "New PortofOrigin" Button of my VF page , Instead of New Record page Am facing an Visualforce Error.......... The code is Below

I have Used an If condition in Value attribute of my TabPanel , I thought this was the reason for Error ...So, resolve this issue and suggest me the way to call an New Record using Formula.

 

<apex:form id="form">
<apex:actionFunction name="setTab" onComplete="return false;" rerender="tabpanel">
<apex:param name="activeTab" assignTo="{!ActiveTab}" value="" />
</apex:actionFunction>

<apex:tabPanel switchType="client" id="tabpanel" value="{!if(ActiveTab != null, ActiveTab, 'tab1')}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<!-- TAB ONE STARTS -->
<apex:tab title="PortofOrigin" label="PortofOrigin" id="object1" name="tab1" ontabenter="setCookie('apex__counter','tab1');" switchType="client">
<apex:message title="Error"/>

<apex:pageBlock title="PortofOrigin" mode="edit" tabStyle="Sourcing__tab">
  <!-- NEW BUTTON WHICH WHEN CLIKCED FOR -->

        <apex:pageBlockButtons location="top" style="padding-left:70px;">
         <apex:commandButton value="New PortofOrigin" action="{!URLFOR($Action.Port_of_Origin__c.New)}" style="font-size:12px;font-weight:bold;width:120px;"/>
        </apex:pageBlockButtons> 
       
        <apex:pageBlockTable value="{!PortofOriginresults}" var="PortofOrigin" id="PortofOrigintblResults">
           <apex:column > 
           <apex:facet name="header">
            <apex:outputPanel style="font-size:13px;">PortofOrigin Name</apex:outputPanel>
           </apex:facet>
           <apex:outputLink value="/{!PortofOrigin.id}" id="eventlink" >{!PortofOrigin.Name} </apex:outputLink>  
          </apex:column>
        </apex:pageBlockTable>
      </apex:pageBlock>

 -Thank you.

 

Hi,

I had developed a Visualforce page which UI looks similar to a ListView with a Search Functionality. My  Page has Executed very well but has Several Issues in UI. I had wrote my Issues after the code. Please check Below

 

<apex:page controller="PortofOriginController" showHeader="false" sideBar="false" tabStyle="Sourcing__tab" id="pg">
<head>
 <apex:message title="Error"/>
 <Style>
  .Body 
    {font-size:14px;font-family:'Calibri';}
 </Style>
 <Script type='text/javascript'>
  function noenter(ev)  {
        if (window.event && window.event.keyCode == 13 || ev.which == 13) {
            doSearchAF();
            return false;
         } else {
              return true;
         }
     }
  function writeDB()
{
   location.reload( 0 );
   return false;
}
 </Script>
</head>
<body>
<apex:form >  
   <c:Sectionheader iconsrc="{!$Resource.Port_Of_Origin}" title="Sourcing" subTitle="Port of Origin" PrintUrl="https://cs5.salesforce.com/a0R/x?fcf=00BO0000000WWES&rolodexIndex=-1&page=1" help="https://help.salesforce.com/htviewhelpdoc?id=co_view.htm&siteLang=en_US"/>
   <apex:actionRegion rendered="true">  
    <apex:outputPanel id="top" layout="block" style="
    border: 0 none;
    font-family: Calibri;
    height: 24px;
    float: right;
    margin-top: -25px;  
    width: 270px;">
      <apex:outputLabel value="Search" style="font-weight:Bold;font-family:'Calibri';padding-right:10px;font-size:14px;" for="txtSearch"/>    
      <apex:inputtext value="{!searchString}" id="txtSearch" onkeypress="return noenter(event);" />
        <span style="padding-left:5px; ">
         <apex:commandbutton id="btnGo" value="Go!" action="{!Search}" rerender="searchResults" status="blockUI" style="width:40px;"/>
        </span>
    </apex:outputPanel>
    <apex:outputPanel id="pnlSearchResults" style="margin:10px;overflow-Y:auto;" layout="block">             
       <apex:pageBlock id="searchResults" title="Port of Origin" mode="edit" tabStyle="Sourcing__tab">
       
        <apex:pageBlockButtons location="top" style="padding-left:70px;">
        <apex:commandButton action="{!URLFOR($Action.Port_of_Origin__c.New)}" value="New Port of Origin" id="blockUI" style="font-weight:bold;width:120px;"  />       
        </apex:pageBlockButtons> 
       
        <apex:pageBlockTable value="{!results}" var="a" id="tblResults">
       
          <apex:column >
            <apex:facet name="header">
               <apex:outputPanel >Action</apex:outputPanel>
            </apex:facet>
            &nbsp;<apex:outputLink title="Edit" value="/{!a.id}/e?retURL=/apex/{!$CurrentPage.Name}" 
            style="font-size:12px; color: #015BA7;font-weight: normal;text-decoration: none;">Edit</apex:outputLink>&nbsp;|&nbsp;             
           <apex:commandLink id="idToDel" reRender="searchResults" title="Delete" action="{!deleteMethod}" immediate="true" onclick="if(!confirm('Are you sure you want to delete ?')) return false;" oncomplete="writeDB();" style="font-size:12px;color: #015BA7;font-weight: normal;text-decoration: none;">Del
             <apex:param value="{!a.Id}" name="idToDel" assignTo="{!delId}"/>
            </apex:commandLink>  
          </apex:column>   
               
          <apex:column > 
           <apex:facet name="header">
            <apex:outputPanel style="">Port of Origin Name</apex:outputPanel>
           </apex:facet>
           <apex:outputLink value="/{!a.id}" id="eventlink" >{!a.Name} </apex:outputLink>  
          </apex:column>

        </apex:pageBlockTable>
       </apex:pageBlock>	
     </apex:outputPanel>
   </apex:actionRegion> 
  </apex:form>
 </body>        
</apex:page>

 

1. As for Search I have a input text box with a  command Button "Go!" i.e search Button  the problem here is when is Enter the search text and Press Enter key in my KeyBoard the Go button is not invoked , instead the New Button of below of PageBlock is being Invoked. 

It works very fine when enter search text and Manually inovkes "Go!" Button or using Mouse or Tab and Enter key.

So I want Only "Go!" Button to be invoked  after entering searchtext by Pressing Enter key.

 

2. In PageblockTable the 1st column has Edit and Delete command links. When I click the DEL command link the Entire page is being refreshes or reloaded with record being deleted... I want only a certain portion or a Output Panel or PageBlockTable to only RELOAD or REFRESHED, leaving the entire page remain Constant only certain page to be reloaded similar to inbox of gmail ... Intially I used Rendered but failed to get the required scenario.

 

-Thank you

Hi,

 

Am working on Tabs in Tabpanel of Visualforce to set all my Objects as Tabs in VF page, When I click any tab it Represents a CustomObject__c in that page I had used the Following Code:

 

<apex:tabpanel>
<apex:tab title="CustomObject" label="CustomObject" name="name1" id="tabOne"> 
<apex:sectionHeader title="Heading" subtitle="SubHeading" > 
 <apex:ListViews type="CustomObject__c" />
</apex:tab>
<apex:tab title="CustomObject1" label="CustomObject1" name="name2" id="tabTwo"> 
<apex:sectionHeader title="Heading" subtitle="SubHeading" > 
 <apex:ListViews type="CustomObject1__c" />
</apex:tab>
</apex:tabpanel>

 But I want the features of ENHANCED LISTS in my VF page So I had replaced the

 <apex:ListViews type="CustomObject__c"/> to 

<apex:enhancedList type="CustomObject__c"/>  

 

With this Change Am facing Issues such as "Loading on the screen" continously but am not able to see the list. 

1. How to use EnhancedList view in tabpanel which has more than 3 Tabs ?

2. Also How to insert Search Functionality in apex: ListViews or EnhancedListViews ?

 

-Thankyou

Hi,

 

Am new to salesforce, I had customized my org with my requirements, But am facing some problem:

I have a Custom JunctionObject__c  which has 2 fileds  CustomField1__c master-detail relation to CustomObject1__c and Similarly  CustomField2__c master-detail relation to CustomObject2__c. 

 

I had Customized the new edit page to my own VF page i.e. VF1 n used StandardController=”JunctionObject__c ”. 

And overriden the "New" button of JunctionObject__c  to VF1.

 

So when we go from CustomObject1__c (PARENT) record we can see the related block JunctionObject__c , NOW when I click the "NEW" button the VF! appears Good. and I insert the data and click Save Button am going to detail page of JunctionObject__c,

But I need to be redirected to the CustomObject1__c detail page of that id. 

Here's below is the VF1 page :

 

<apex:page standardController="JunctionObject__c" extensions="testController">
<apex:sectionHeader title="JunctionObject Edit"  subtitle="New JunctionObject" />
<apex:form id="myForm">  
 <apex:pageBlock title="JunctionObject Edit" mode="edit">
   <Apex:pageBlockButtons >
    <apex:commandButton action="{!save}" value="save"/>   
    <apex:commandButton action="{!cancel}" value="cancel"/>   
   </Apex:pageBlockButtons>
   <apex:pageBlockSection title="JunctionObject Information" columns="1">  <br/>
  <apex:pageBlockSectionItem >
   <apex:outputLabel value="CusomField1"/>
     <apex:inputField  value="{!var.CustomObject1__c}" />
    </apex:pageBlockSectionItem> <br/> 
    <apex:pageBlockSectionItem > 
   <apex:outputLabel value="CusomField2"/> 
    <apex:inputField value="{!var.CustomObject2__c}" /> 
   </apex:pageBlockSectionItem> 
   </apex:pageBlockSectionItem> 
   </apex:pageBlockSection> 
  </apex:pageBlock>
 </apex:form>
</apex:page>

 And my TestController is as Follows:: 

 

public class testController {

public JunctionObject__c var {get;set;}
 
  public testController(ApexPages.StandardController controller) {
    var= new JunctionObject__c();
  }
 
}

 

I didn't write any code for save Method, Now Please suggest the code for Save Method which saves the object and redirects it to the parent CustomObject1__c.

I.e. a Save button when clicked saves the inputvalues to the JunctionObject and Redirectes straight away to the previous CustomObject1 from where it came.

Would be very helpful, if provided the code.

 

Thankyou.

 

I am converting the tables in my sql server database  to force.com as Objects and there are some tables which has relationship with views,

So how to show these on force.com

Hi all, 

I have around 70-90 objects(SUB MENU's) in force.com which are catogorized into 5 divisions (MAIN MENU TABS), So our requirement is to have " 5 tabs as MAIN MENU and the objects which are generally considered as TABS as SUB MENU's"

How this can be acheived in force.com ?

So that, it can be clear and understandable for our clients.  

Hi, we are a TEAM of 3 are developing a application in dev org. We are not able get the complete access to the app, by creating USERS in an org, wats the Standard way to work in parallel & develop an application with both admin & development work.

Thanks in Advance!

I have been attempting to use .css styling to achieve rounded corners for the active and inactive tabs for the standard apex:tabPanel. Rounded corners do appear but only on the "inner frame" of the tab header. There seems to be a hard coded light grey rectangular outer border around each of the tabs that I dont understand how to remove. There also seems to be a hard coded horizontal border between the top of the tab content frame and the bottom of each of the tabs. I have tried border: none, color and size options but they dont seem to affect this additional border. I would appreciate any thoughts or suggestions.

  • February 26, 2012
  • Like
  • 0