• Atest
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies

I was tring to build a Page Block table with Inner class list :

 

Component.Apex.PageBlockTable pbt = new Component.Apex.PageBlockTable(var = 'opl' , id='ptable') ;
pbt.expressions.value='{!opClassList}' ;

 

here opClassList is list of inner class elements.

 

and was try ing to add input field as column 

Component.Apex.InputField inputField = new Component.Apex.InputField();
inputField.expressions.value = '{!opl.ol.' + fName + '}';
column.childComponents.add(inputField);

 here the fname is API name.

 

The wrapper class looks like this :

 

public class otable
{
public Opportunity_Line__c ol{get;set;}
public boolean selected{get;set;}

public otable(Opportunity_Line__c o)
{
ol = o;
selected = false;
} 
}

 But it does not seem to work. But if I use Opportunity Line list directly then it works perfectly.  so my question is Does Dynamic Visualforce Component (Page block table) support "wrapper class"?? or there is  some prob with my code. Have any one tried wrapper class with Visualforce Component (Page block table) to get the selected list?

 

Thanks in advance :)

 

  • January 29, 2013
  • Like
  • 0

I have some customs object which are child(master-detail) of Account.  Those objects are available to customer portal.  Now when I set Account Security Controls >> Sharing Settings     to Private I cant see any data. But when set Public Read/Write I am able to see all data of whole org.

 

Q1. What I want to see is the data which are related to that Account for which I have activated the customer portal User.

 

Q2. I have checked that there is no tab available for Account & contact for Customer Portal User profile. So is that means , Logged in user can view account detail from a standerd page? I am not talking about custom VF page . I am talking about normal tab view inside customer portal.

  • April 19, 2012
  • Like
  • 0

Is there any guide or code available on force.com & database.com integration ? we are dealing with high volumn of data. If there is any native intergration technique (as both of them share same platform) please let me know.

  • April 18, 2012
  • Like
  • 0

I was tring to build a Page Block table with Inner class list :

 

Component.Apex.PageBlockTable pbt = new Component.Apex.PageBlockTable(var = 'opl' , id='ptable') ;
pbt.expressions.value='{!opClassList}' ;

 

here opClassList is list of inner class elements.

 

and was try ing to add input field as column 

Component.Apex.InputField inputField = new Component.Apex.InputField();
inputField.expressions.value = '{!opl.ol.' + fName + '}';
column.childComponents.add(inputField);

 here the fname is API name.

 

The wrapper class looks like this :

 

public class otable
{
public Opportunity_Line__c ol{get;set;}
public boolean selected{get;set;}

public otable(Opportunity_Line__c o)
{
ol = o;
selected = false;
} 
}

 But it does not seem to work. But if I use Opportunity Line list directly then it works perfectly.  so my question is Does Dynamic Visualforce Component (Page block table) support "wrapper class"?? or there is  some prob with my code. Have any one tried wrapper class with Visualforce Component (Page block table) to get the selected list?

 

Thanks in advance :)

 

  • January 29, 2013
  • Like
  • 0

Hi,

 

  I have written the following trigger.

 

 

trigger OpportunityStageToCaseStatus on Opportunity (after update) {
/////////////////////////////////
// This Trigger updates the Case status of the related opportunity//
/////////////////////////////////

if(trigger.isAfter && trigger.isUpdate) {

// Create List of Cases that relate to this Opportunity
List<Case> lstCasesToCheck = [SELECT Opportunity__c, Status FROM Case WHERE Opportunity__c IN :trigger.new];
List<Case> lstCasesToUpdate = new List<Case>();

for(Opportunity o : trigger.new) {

// Check to see if the StageName has changed

{
if(trigger.newMap.get(o.Id).StageName != trigger.oldMap.get(o.Id).StageName)
// Loop through Cases
for(Case c : lstCasesToCheck) {
if(o.StageName == 'Closed/Won') {
c.Status= 'Resolved';
lstCasesToUpdate.add(c);
}
}

}

}

// Bulk DML
if(lstCasesToUpdate.size() > 0) { update lstCasesToUpdate; }

}
}

 

 

and wrote the following test class.

 

@isTest
private class OpportunityStageToCaseStatustest {

static testMethod void myUnitTest() {

case c=new case(Status='New',Origin='Email',Opportunity__c='006V0000002fHfU');
insert c;
opportunity o= new opportunity(id='006V0000002fHfU',StageName = 'Closed/Won');
update o;
c.status='Resolved';
update c;


}
}

 

But it shows only 60% code coverage. so i am not able to push the code to production. Any advise on this please.

Thanks!

The free Inline Account Hierarchy App is very nice, and a good example of how to do clever stuff without nasty code, but when you collapse part of the hierarchy, it doesn't show with a + sign that their are hidden children.

 

Has anyone been able to add this functionality?