• Wizno @ Configero
  • NEWBIE
  • 213 Points
  • Member since 2013
  • Senior Developer
  • Configero


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 64
    Replies
I have a background in custom application development and data model design.  I'm used to loading data with sql scripts or other programmatic means.

I'm not sure how best to load data into Salesforce.  I have a brand new instance with data where we have a many-to-many relationship between a custom object and Accounts.  I have to load in the Account data, and for each Account record, there are at least three entries in the custom object.  From what I have seen, my only options are to load the Account records, and then get those Account IDs, and manually copy each record ID into a spreadsheet (at least 3 times) in order to relate those Account records to each of the custom objects.  Then, load the entries for the custom objects, and get those IDs.  Last, a very painful manual step of mapping the ID's of the appropriate custom objects to the IDs of the Account objects in the spreadsheet.

Example:
Account ID 123
Associated Custom Objects IDs 111, 222, 333

Account ID 456
Associated Custom Objects IDs 333,444,555,666

Account ID 789
Associated Custom Objects IDs 111,222,333,444,555,666,777,888,999

What is the best way to do this?  Is there some 'database interface' that allows SQL-like script execution?

Links to tutorials, PDFs, etc appreciated!
i created a wraper to display opp when selected from list...so here the prob is am getting this error even if call the method ....am getting this error.. Unknown property 'wraperforopp.prosses

Here is my vf page and class


VF page:

<apex:page controller="wraperforopp" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="{!prosses}" title="Click here"/>
</apex:pageBlockButtons>
<apex:pageblockSection title="All Accounts" collapsible="false" columns="2">
<apex:pageBlockTable value="{!oppertunitycrete}" var="o">
<apex:column >
<apex:inputCheckbox value="{!o.Selected}"/>
</apex:column>
<apex:column value="{!o.opp.name}" title="OPP Name"/>
<apex:column value="{!o.opp.Amount}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!createinnew}" var="h">
<apex:column value="{!h.name}"/>
<apex:column value="{!h.Amount}"/>
</apex:pageBlockTable>
</apex:pageblockSection>
</apex:pageBlock>

</apex:form>

</apex:page>


My class:

public class wraperforopp {

    


 public List<wraperopp> oppertunitycrete{get;set;}
 public List<opportunity> createinnew{get;set;}
 
 
 Public wraperforopp(){
 if(oppertunitycrete==null){
 oppertunitycrete=New List<wraperopp>();
 for(opportunity o:[select id,name,Amount from opportunity limit 10]){
 oppertunitycrete.add(new wraperopp(o) );
 }
 }
 }
 

    public void prosses(){
    createinnew=New List<opportunity>();
    for(wraperopp wraperoppobj:oppertunitycrete){
    if(wraperoppobj.Selected==true){
    createinnew.add(wraperoppobj.opp);
      }
     }
  }
 
 
 public class wraperopp{
 public opportunity opp{get;set;}
 public Boolean Selected{get;set;}
 
 public wraperopp(opportunity op){
 opp=op;
 Selected=false;
 }
 }
}


this is my class and controller ...here even i called the prosses then also am getting this error :Unknown property 'wraperforopp.prosses

What to do...thanks in advance
I have a html customized visualforce page that displays idea records. I have successfully implemented everything, except for the promote/demote buttons. How would I put that in my page under each record displayed? I've searched the documentation, but haven't had any success. 

Any help would be much appreciated!

Thanks!

 
01 trigger populateFieldOnCase on Case (before insert){

02     Set<id>parentIds = new Set<id>();

03     for(Case acase:trigger.new){

04         parentIds.add(acase.project__c);

05     }

06     Map<id,parent__c> pro = new Map<id,parent__c>([select id,parentField__c from parent__c where idin :parentIds]);

07     for(case acase:trigger.new){

08         <strong>if(pro.get(acase.id) != null){</strong>

09             acase.childfield__c = pro.get(acase.id).parentField__c;

10         <strong>}</strong>

11     }

12 }
Hi,

I have a controller which I have used from a glorious Bob Buzzard blog:
 
public class CSTHomeController 
{
 public String nameQuery {get; set;}
 public List<Complaints__c> com {get; set;}
  
 public PageReference executeSearch()
 {
  String queryStr='%' + nameQuery + '%';
  com=[select id, 
              Name, 
              Patient_Name_Reference__c,
              Date_and_time_complaint_lodged__c,
              Complainant_Type__c 
            from Complaints__c 
            where Patient_Name_Reference__c like :queryStr];
            
  return null;
 }
  
 public CSTHomeController ()
 {
  // if query appears in URL, execute it
  String urlQuery=ApexPages.currentPage().getParameters().get('query');
   
  if ( (null!=urlQuery) && (0!=urlQuery.length()) )
  {
   nameQuery=urlQuery;
   executeSearch();
  }
 }
}

This works perfectly, but I want to use several of these searches together on one page.  The above is for a complaints object, but we have a customer feedback object and an audits object which I want to use this for.  I am building a visualforce page which will become a Customer Service Team landing page and they can search across these different objects but ....

How do I add more searches onto the same controller?

Visualforce Page with duplicated search in very early stages of development:
 
<apex:page controller="CSTHomeController">
   <style type="text/css">
   
h1 { 
    display: block;
    font-size: 18pt;
    font-family: arial;
    font-weight: bold;
    text-align: center;
}

</style>
<h1> Customer Service Team </h1>
    <apex:form >
        <apex:pageBlock >
            <table>
                <tr>
                    <td><apex:outputlink value="https://cs21.salesforce.com/a0C/o">Complaints Home</apex:outputlink></td>
                </tr>
                <tr>
                    <td style="height:10px;"></td>
                </tr>
                <tr>
                    <td><apex:outputLabel value="Search for a Complaint"/></td>
                </tr>
                <tr>
                    <td><apex:inputText value="{!nameQuery}"/></td>
                </tr>
                <tr>
                    <td style="height:10px;"></td>
                </tr>
                <tr>
                    <td><apex:commandButton action="{!executeSearch}" value="Search"/></td>
                </tr>
            </table>  
            <apex:pageBlockTable value="{!com}" var="comp">
                <apex:column headerValue="Complaint Results">
                    <apex:outputLink value="/{!comp.id}/e?retURL={!URLENCODE('/apex/RetUrlSearchPage?query='+nameQuery)}">{!comp.Name}</apex:outputLink>
                </apex:column>
                <apex:column value="{!comp.Patient_Name_Reference__c}"/>
                <apex:column value="{!comp.Date_and_time_complaint_lodged__c}"/>
                <apex:column value="{!comp.Complainant_Type__c }"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
    <apex:form >
    <apex:pageBlock >
            <table>
                <tr>
                    <td><apex:outputlink value="https://cs21.salesforce.com/a0C/o">Complaints Home</apex:outputlink></td>
                </tr>
                <tr>
                    <td style="height:10px;"></td>
                </tr>
                <tr>
                    <td><apex:outputLabel value="Search for a Complaint"/></td>
                </tr>
                <tr>
                    <td><apex:inputText value="{!nameQuery}"/></td>
                </tr>
                <tr>
                    <td style="height:10px;"></td>
                </tr>
                <tr>
                    <td><apex:commandButton action="{!executeSearch}" value="Search"/></td>
                </tr>
            </table>  
            <apex:pageBlockTable value="{!com}" var="comp">
                <apex:column headerValue="Complaint Results">
                    <apex:outputLink value="/{!comp.id}/e?retURL={!URLENCODE('/apex/RetUrlSearchPage?query='+nameQuery)}">{!comp.Name}</apex:outputLink>
                </apex:column>
                <apex:column value="{!comp.Patient_Name_Reference__c}"/>
                <apex:column value="{!comp.Date_and_time_complaint_lodged__c}"/>
                <apex:column value="{!comp.Complainant_Type__c }"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
        </apex:form>
</apex:page>



Thanks

Hello,

 

I have a custom VF page that contains Javascript to toggle through a set of images (red, yellow, green) and assigns value based on the image.  There is also a section in my controller that assigns a variable to render sections of the VF page, based on whether or not the user selects a certain stage.  Without the render code in my controller, the Javascript works as expected.  However, when I use the sections of my controller to render the appropriate section, it works as expected but the Javascript stops working.  Can anyone fgure out why based on my VF page and Controller below:

 

VF Page:

 

<apex:page standardController="Opportunity" tabStyle="Opportunity" ShowHeader="TRUE" extensions="OppMgmtController" action="{!testom}">


<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" />

<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js" />

 

<!--Javascript section to handle red/yellow/green ball toggle for qualifier status-->
<script type="text/javascript">
$j = jQuery.noConflict();
$j(document).ready(function () {
$j('.icon').click(function () {
$j(this).hide();
var next = $j(this).next();
if (next.length == 0)
next = $j(this).parent().find('.icon').first();
next.show();

setFieldValue(next.attr("name"), next.attr("id")); //Pass the name and id of selected icon to function

});
});
function setFieldValue(name, color){
var selector = "." + name; //The selector is the styleClass for the hidden field
if(color == "R"){
$j(selector).val("0");
}else if(color == "Y"){
$j(selector).val("1");
}else if(color == "G"){
$j(selector).val("2");
}
}

</script>

<style type="text/css">
#StatusIcon
{
position: relative;
}

.icon
{
position: relative;
margin: auto;
top: 0px;
left: 0px;
display: none;
}

.icon.default
{
display: block;
}

</style>

<apex:form >

 

<apex:repeat value="{!oppmgr}" var="opp">

<table align="right" columns="3" width="100%">
<tr>
<td align="right" width="75%">
<apex:commandLink id="Stage1" value="Stage 1 - Identify Target" action="{!Stage1}" rerender="NewQualifiers"/>&nbsp;&nbsp;&nbsp;
</td>
<td width="20%" style="border: 2px solid silver;padding:none">
<hr style="height:15px; border:none;
margin:0;" align="left" width="0%"/>
</td>
<td width="5%">
0%
</td>
</tr>

<tr>
<td align="right" width="75%">
<apex:commandLink id="Stage2" value="Stage 2 - Qualify Target" action="{!Stage2}" rerender="NewQualifiers"/>&nbsp;&nbsp;&nbsp;
</td>
<td width="20%" style="border: 2px solid silver;padding:none">
<hr style="height:15px; border:none;
margin:0;" align="left" width="0%"/>
</td>
<td width="5%">
0%
</td>
</tr>


</table>

<apex:outputPanel id="NewQualifiers">

<apex:outputPanel rendered="{!IF((Stage1Qual=True || (Stage1Qual=False && Stage2Qual=False && Stage3Qual=False && Stage4Qual=False && Stage5Qual=False)),'true','false')}">
<table width="100%">
<tr >
<td colspan="5">
<div class="SectSubHeader">STAGE 1 - IDENTIFY TARGET</div><br></br>
</td>
</tr>

<tr valign="middle" >
<td colspan="4"><br/></td>
</tr>

<tr valign="middle" >
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s1q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s1q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s1q1n"/>
</div>
</td>
<td width="1%">
<apex:inputField value="{!opp.S1Q1_New__c}" styleClass="s1q1n" style="visibility:hidden; width:10%;"/>
</td>
</tr>


<tr valign="middle">
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s1q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s1q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s1q2n"/>
</div>
</td>
<td width="1%">
<apex:inputField value="{!opp.S1Q2_New__c}" styleClass="s1q2n" style="visibility:hidden; width:10%;"/>
</td>
</tr>

 

</table>

<br/><br/>

</apex:outputPanel>


<apex:outputPanel rendered="{!Stage2Qual}">

<table width="100%">
<tr >
<td colspan="5">
<div class="SectSubHeader">STAGE 2 - QUALIFY TARGET</div><br></br>
</td>
</tr>

<tr valign="middle" >
<td colspan="5"><br/></td>
</tr>

<tr valign="middle" >
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s2q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s2q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s2q1n"/>
</div>
</td>
<td width="1%">
<apex:inputField value="{!opp.S2Q1_New__c}" styleClass="s2q1n" style="visibility:hidden; width:10%;"/>
</td>
</tr>


<tr valign="middle">
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s2q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s2q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s2q2n"/>
</div>
</td>
<td width="1%">
<apex:inputField value="{!opp.S2Q2_New__c}" styleClass="s2q2n" style="visibility:hidden; width:10%;"/>
</td>
</tr>


<tr valign="middle">
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s2q3n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s2q3n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s2q3n"/>
</div>
</td>
<td width="1%">
<apex:inputField value="{!opp.S2Q3_New__c}" styleClass="s2q3n" style="visibility:hidden; width:10%;"/>
</td>
</tr>

 

</table>

<br/><br/>

</apex:outputPanel>

</apex:outputPanel>


</apex:repeat>
</apex:form>

</apex:page>

 

Controller:

 

public class OppMgmtController{

public List<Opportunity_Stage_Manager__c> oppmgr {get; set;}

private final Opportunity opp;
public OppMgmtController(ApexPages.StandardController myController) {
oppmgr = new List<Opportunity_Stage_Manager__c>();
opp=(Opportunity)myController.getrecord();
system.debug('#########opp#########' + opp);

}
Opportunity_Stage_Manager__c oppmgr2 = new Opportunity_Stage_Manager__c();
public void testom(){

system.debug('****************');
system.debug('****************:'+oppmgr2);
oppmgr2.Opportunity__c = opp.id;
oppmgr.add(oppmgr2);
system.debug('########################');
}
public PageReference save() {
string opportunityID=ApexPages.currentPage().getParameters().get('id');
List <Opportunity_Stage_Manager__c> lt1=[SELECT id
FROM Opportunity_Stage_Manager__c
WHERE Opportunity__c =:opportunityID];

if(lt1.size()>0)
{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.severity.WARNING, 'Opportunity Management Already Exists on This Opportunity. Please Delete or Edit the Existing Scorecard');
ApexPages.addMessage(myMsg);
return null;
}
Else
insert oppmgr;
{

PageReference RetPage = new PageReference('/apex/OppStageMgrEdit2?id=' + oppmgr[0].id);
RetPage.setRedirect(true);
return RetPage;
}
}

public boolean Stage1Qual {get; set;}
public boolean Stage2Qual {get; set;}public void Stage1() {

Stage1Qual = true;
Stage2Qual = false;
Stage3Qual = false;
Stage4Qual = false;
Stage5Qual = false;
}
public void Stage2() {
Stage1Qual = false;
Stage2Qual = true;
Stage3Qual = false;
Stage4Qual = false;
Stage5Qual = false;
}

}

 

  • May 24, 2013
  • Like
  • 0

Hi All,

       I have  created simple VF page and the  page is added to the pagelayout(Account) . But this add page is only visible in detailed but in edit it is not display. How to make this VF page to editable in the edit page layout. 

 

thanks 

Hi,
I have a vf page and in this vf page i use a loading image and this image is show in system but i want to show in the salesforce1 app so what should i have to do regarding this pop up on button click.
User-added image
I am trying to integrate my app with salesforce and I am using Rest API using Python. Following things I am implementing

1. Any user of Salesforce from any domain integrate with my app who is registered on my app.

2. Once user integrate app with salesforce I will get access token which I will use in Rest API call.

3. I want to create Apex trigger in salesforce on behalf of user which will call my app API.

I am stuck at point 3 because I am not finding documentation for creating Apex trigger using Salesforce Rest API.

Also I want to know what are the permission levels for Apex Trigger and Apex class ? For example:

1. If user is integrating salesforce with my app and he is sales person and  not administrator then still he can create trigger and classes?

2. If my app ask for salesforce credential and user enter credential of salesforce which is in production  then still my app create apex trigger and apex class on behalf of user?  
Hi,

I'm working on development custom object integration app.
I can implement below code in apex.
 
Lead lc1 = new Lead();
                    
                    lc1.Company = HogeObjectSelects[idx].record.Name;
                    lc1.LastName = HogeObjectSelects[idx].record.LastName__c;
                    lc1.FirstName = HogeObjectSelects[idx].record.FirstName__c;
                    lc1.email = HogeObjectSelects[idx].record.EmailAddress__c;
                    lc1.Status = 'Open - Not Contacted';
                    lc1.OwnerId = HogeObjectSelects[idx].record.OwnerId;
                upsert lc1;
sure, this is hard-code.
The app users are not able to change mapped fields...
Even though I provide mapping rule on GUI,
I can not implement the code.
 
My above idea is similar to general feature "Map Custom Lead Field".
https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_mapleads.htm&language=en
Could you please provide your sample code or reference?
 
Thanks,
Tack
 
  • November 12, 2014
  • Like
  • 0
I have a background in custom application development and data model design.  I'm used to loading data with sql scripts or other programmatic means.

I'm not sure how best to load data into Salesforce.  I have a brand new instance with data where we have a many-to-many relationship between a custom object and Accounts.  I have to load in the Account data, and for each Account record, there are at least three entries in the custom object.  From what I have seen, my only options are to load the Account records, and then get those Account IDs, and manually copy each record ID into a spreadsheet (at least 3 times) in order to relate those Account records to each of the custom objects.  Then, load the entries for the custom objects, and get those IDs.  Last, a very painful manual step of mapping the ID's of the appropriate custom objects to the IDs of the Account objects in the spreadsheet.

Example:
Account ID 123
Associated Custom Objects IDs 111, 222, 333

Account ID 456
Associated Custom Objects IDs 333,444,555,666

Account ID 789
Associated Custom Objects IDs 111,222,333,444,555,666,777,888,999

What is the best way to do this?  Is there some 'database interface' that allows SQL-like script execution?

Links to tutorials, PDFs, etc appreciated!
I have installed Recurring donation npsp package from salesforce foundation.
I are getting below error in sandobox
Invalid field npe01__One2OneContact__c for npo02__Household__c

This started coming up only after enabling multicurrency
Is it possible to create a standard list view in code?  Basic idea is a trigger on Account creation, when Account ABC is created I want a list view created on Contacts with the filter of Account Name equals ABC (Account Name of newly created Account). The list view would have some default columns like FirstName,  LastName, Phone and be visible only to the user that created the new Account.

Hope that makes sense, hoping someone has some ideas. THANKS
We have a force.com site and have recenecly changed our google analytics tracking code in the site settings - for some reason the pages (which are using the tag which should pull the analytics code in automatically) are still using the old analytics code. I can't find anything anywhere that suggests this would be cached, does anyone have any idea what would cause this?
I have a fully visualforce styled community site with a custom login page and logout button. The login and logout functions work, but if I logout, I can still access the site by typing in the URL of a supposedly "locked down" page. How do I prevent this from happening?

Thanks!
We are trying to add an object to our pull in to the SalesForce and we need wsdl file. The one we can get now keeps on failing at login. In the past we have used services of a vendor and do not have access to older version of wsdl file. How can we get that? Thanks for any help on this!
Hi,

I would like to use Force.com IDE for my org. I am not able to see security token as IP restrictions is enabled in our ord. How do we use Force.com IDE in such cases?
I am an admin. I have tried to reset my password to see if I receive the security token in the email as mentioned in one of the posts, but I havent.

How do I use Force.com IDE?

Thanks,
Swapna
Currently i see poll,link,file & more menu options as the top of chatter page. Is there a way to display 4 options instead of 3 and then "more"  ?Thanks.
  • November 07, 2014
  • Like
  • 0
I want selcted 4 Custom objects name fied as pick list value in my VF page. this is my code.. its not working...
 
<apex:page controller="objectController">
<apex:form > 
      <apex:pageBlock >
          <apex:pageBlockSection columns="4">

              <apex:pageBlockSectionItem >
                  <apex:outputlabel value="Franchise :"/> 
                      <apex:actionRegion >      
                           <apex:selectList value="{!Franchise}" size="1">
                                    <apex:selectOptions value="{!franchisenames}"/>
                                    <apex:actionSupport event="onchange" rerender="Brand"/>
                            </apex:selectList>
                     </apex:actionRegion>                         
              </apex:pageBlockSectionItem>
              
              
              <apex:pageBlockSectionItem >
                      <apex:outputlabel value="Brand :"/>   
                      <apex:outputPanel id="Brand">   
                        <apex:actionRegion >  
                           <apex:selectList value="{!Brand}" size="1">
                                <apex:selectOptions value="{!Brandnames}"/>
                               <apex:actionSupport event="onchange" rerender="Program"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                     </apex:outputPanel>
              </apex:pageBlockSectionItem>
              
              <apex:pageBlockSectionItem >
                      <apex:outputlabel value="Program :"/>   
                      <apex:outputPanel id="Program">   
                        <apex:actionRegion >  
                           <apex:selectList value="{!Program}" size="1">
                                <apex:selectOptions value="{!Programnames}"/>
                                 <apex:actionSupport event="onchange" rerender="Program"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                     </apex:outputPanel>
              </apex:pageBlockSectionItem>
              
              
              <apex:pageBlockSectionItem >
                      <apex:outputlabel value="Campaign :"/>   
                      <apex:outputPanel id="Campaign">   
                        <apex:actionRegion >  
                           <apex:selectList value="{!Campaign}" size="1">
                                <apex:selectOptions value="{!Objectnames}"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                     </apex:outputPanel>
              </apex:pageBlockSectionItem>

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

and my apex class is below.. I think i have problem with Apex class. Please correct it.. 

Thanks In Advance.....
 
public class objectController
{
    public Map <String, list<METADATA_Campaign__c>> CampMap = [select name from METADATA_Campaign__c];
    public Map<string, List<METADATA_Franchise__c>> FranMap =[select name from METADATA_Franchise__c];
    public Map<string, List<METADATA_Program__c>> ProgMap =[select name from METADATA_Program__c];
    public Map<string, List<METADATA_Brand__c>> BranMap =[select name from METADATA_Brand__c];

    public String franchise {get; set;}
    public String program {get; set;}
    public String campaign {get; set;}
    public String brand {get; set;}

    Public objectController()
    {   
        selectedObject = 'METADATA_Campaign__c';
    }

    public List<SelectOption> getcampaigns() 
    {
        List<SelectOption> campaignnames = new List<SelectOption>();
        List<String> entities = new List<String>(campMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            campaignnames.add(new SelectOption(name,name));
        }
        return campaignnames;
     }
     
     Public objectController()
    {   
        selectedObject = 'METADATA_Franchise__c';
    }
     
    public List<SelectOption> getfranchise() 
    {
        List<SelectOption> franchisenames = new List<SelectOption>();
        List<String> entities = new List<String>(FranMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            franchisenames.add(new SelectOption(name,name));
        }
        return franchisenames;
     }

 Public objectController()
    {   
        selectedObject = 'METADATA_Program__c';
    }
     
    public List<SelectOption> getProgram() 
    {
        List<SelectOption> Programnames = new List<SelectOption>();
        List<String> entities = new List<String>(ProgMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            Programnames.add(new SelectOption(name,name));
        }
        return Programnames;
     }
     
      Public objectController()
    {   
        selectedObject = 'METADATA_Brand__c';
    }
     
    public List<SelectOption> getbrand() 
    {
        List<SelectOption> brandnames = new List<SelectOption>();
        List<String> entities = new List<String>(BranMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            brandnames.add(new SelectOption(name,name));
        }
        return brandnames;
     }
 }

 
i created a wraper to display opp when selected from list...so here the prob is am getting this error even if call the method ....am getting this error.. Unknown property 'wraperforopp.prosses

Here is my vf page and class


VF page:

<apex:page controller="wraperforopp" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="{!prosses}" title="Click here"/>
</apex:pageBlockButtons>
<apex:pageblockSection title="All Accounts" collapsible="false" columns="2">
<apex:pageBlockTable value="{!oppertunitycrete}" var="o">
<apex:column >
<apex:inputCheckbox value="{!o.Selected}"/>
</apex:column>
<apex:column value="{!o.opp.name}" title="OPP Name"/>
<apex:column value="{!o.opp.Amount}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!createinnew}" var="h">
<apex:column value="{!h.name}"/>
<apex:column value="{!h.Amount}"/>
</apex:pageBlockTable>
</apex:pageblockSection>
</apex:pageBlock>

</apex:form>

</apex:page>


My class:

public class wraperforopp {

    


 public List<wraperopp> oppertunitycrete{get;set;}
 public List<opportunity> createinnew{get;set;}
 
 
 Public wraperforopp(){
 if(oppertunitycrete==null){
 oppertunitycrete=New List<wraperopp>();
 for(opportunity o:[select id,name,Amount from opportunity limit 10]){
 oppertunitycrete.add(new wraperopp(o) );
 }
 }
 }
 

    public void prosses(){
    createinnew=New List<opportunity>();
    for(wraperopp wraperoppobj:oppertunitycrete){
    if(wraperoppobj.Selected==true){
    createinnew.add(wraperoppobj.opp);
      }
     }
  }
 
 
 public class wraperopp{
 public opportunity opp{get;set;}
 public Boolean Selected{get;set;}
 
 public wraperopp(opportunity op){
 opp=op;
 Selected=false;
 }
 }
}


this is my class and controller ...here even i called the prosses then also am getting this error :Unknown property 'wraperforopp.prosses

What to do...thanks in advance
I have a html customized visualforce page that displays idea records. I have successfully implemented everything, except for the promote/demote buttons. How would I put that in my page under each record displayed? I've searched the documentation, but haven't had any success. 

Any help would be much appreciated!

Thanks!

 
I am designing a website on top of communities. My homepage dsiplays recently submitted records and top voted records (up to 10) using data repeaters. I would like to have the title of each record utilized as a link that would take the user to a visualforce landing page that shows the details of that record. Since the records on my homepage will be dynamically updated, how do I have my landing pages follow suit?

Any ideas and/or strategies?

Thanks!!
Hi,

I am using Data Tables and Forms in site.com page and i want to write custom CSS for Data Tables and Forms.
pls Help me

Hi. I'm trying to create a portal user in a force.com site but I can't seem to get a userId returned from site.createpersonaccountportaluser.  No matter what I do nothing comes back. obnoxious. Has anyone else had this problem and/or solved it?

 

Here's the code where it's called. Student is a contact that was just created.

 

pUser = new User();
pUser.FirstName = student.firstName;
pUser.lastName = student.lastName;
pUser.Username = student.Email;
pUser.Email = student.Email;
pUser.CommunityNickname = student.firstName.left(1) + student.LastName;
pUser.Alias = student.firstName.left(1) + student.LastName.left(4);
pUser.emailencodingkey='UTF-8';
pUser.languagelocalekey='en_US';
String ownerId = site.getAdminId();

for(integer i=0; i < 10; i++){
userId = Site.createPersonAccountPortalUser(pUser, ownerId, currRecType, pwSelect);
if(userId != null)break;
}

  • October 31, 2013
  • Like
  • 0