• anshu
  • NEWBIE
  • 10 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
Hi All,

I need little help in developing below pattern:

I tried so many things but keeping header as common means , we need to work with HTML tables .
So, i have used Html table with nested repeats, but I want that child line item should also come in different rows , but in my case , I am getting all line items in same row.Please suggest , how to resolve this??
column1     column2     column3       column4     column5
p1                  p2         plineitem1   plineitem12   plineitem112
a1                  a2
c1                  c2         clineitem1   clineitem11   plineitem112
                                  clineitem2   clineitem12   clineitem112
                                  clineitem3   clineitem13   clineitem112
d1                  d2         dlineitem1   dlineitem12   dlineitem112    

currently,

<table width="100%" cellspacing="0" cellpadding="0" style="border:solid 1px #cccccc"  class="list " rules="all" >
  <thead>
    <tr class="headerRow">
    <th class="headerRow"> column1  </th>
    <th class="headerRow"> column2</th>
      <th class="headerRow">column3</th>
      <th class="headerRow" >column4</th>
        <th class="headerRow" >column5</th>
</thead>

<tbody>

 <apex:repeat value="{!items_to_approve}" var="item_to_approve"  >

   <apex:repeat value="{!wrapper}" var="qlist"  >
   <tr class="dataRow">
    <td>{!item_to_approve.name}</td>
    <td>{!item_to_approve.id}</td>
    <td>{!qlist.qrec.id}</td>
<td>{!qlist.qrec.name}</td>
<td>{!qlist.qrec.phone}</td>
    </tr>

  </apex:repeat>
</apex:repeat>
</tbody>

</table>

but still , m not able to get the desired output.please help
  • February 12, 2015
  • Like
  • 0
We are having a Vf page in which we have used action function and  on "oncomplete" event we are running some other functionality.
But there are few validation errors in the system , which are coming onVf page  , In that case Oncomplete should not fire but this is not happening .
we have put try catch block and maintaining a boolean variable to check the exception , but it seems that variable is not getting updated in catch block whenever there is any exception


 <apex:actionFunction action="{!Savedetail}" name="InsertRecord_JS" Rerender="pb1" status="actstatuspp"  oncomplete="CallWebService_JS({!detailerr});"/>


This varaible is always coming as false , even we have make it false in the controller in the catch block.

Please suggest
  • December 05, 2014
  • Like
  • 0
I need to craete a Vf page in Below format:

label      product1                  product 2             product 3
name      p1 chckbx                p2  chckbx               p3 chckbx
total         5  chckb                 6     chckb               7  chckb

i need to display table horizontally and also one more thing need to bind all the checkbox values with some other custom object on click of button.
  • March 10, 2014
  • Like
  • 0

Hi All,

 

I need to insert question and all associated answer with those questions , questions could be multiple and answer for single question could be multiple.

I am having a map and I am putiing values to that map, but when I tried to get the value and debug those keyset values then those values have changed.

Here , is the code snippet:

map<Questions__c,list<Answers__c>> quesans= new map<Questions__c,list<Answers__c>>();

 

//in this map , I am putting the values. Here ques is question instance and allans is list of answers

  quesans.put(ques,allans); 

 

Then , i need to insert questions first as there's master-detail relationship between question and answers:But this statement is coming as null , blow is the code:

 

ist<Questions__c>qq=new list<Questions__c>();
qq.addall(quesans.keyset());

insert qq;

for(Questions__c q:qq){
if(quesans.get(q)!= Null){   // but this is coming null while map is returning correct values???
for(Answers__c a : quesans.get(q)){
a.Questions__r = q ;
anss.add(a);
}
}

 

if any one found/got the issue please help me out.Thanks in advance

 

  • August 14, 2012
  • Like
  • 0

Hi ,  opportunity should be deleted along with its related list , which is a custom object,but i m not able to delete related list

trigger deleteopportunity on Opportunity (before delete) {

 

list<string> opp1= new List<String>();

list<string> pro1= new List<String>();

list<projct__c> pro;

      for(Opportunity o : Trigger.old){

 

    opp1.add ( o.Id );

  }

  pro= [select id,name,Opportunity__c from projct__c where Opportunity__c IN:opp1];

  for(projct__c p:pro){

   pro1.add(p.id);

   }

 

clsdeleteopportunity.deleteall(pro1);

 

}

 

class code:

public with sharing class clsdeleteopportunity{

    @future

 public static void deleteall(list<string> oppid)

 {

 

list<projct__c>pro=new List<projct__c>();

list<string> pro1=new List<string>();

pro= [select id,name,Opportunity__c from projct__c where Opportunity__c IN:oppid ];

 for(projct__c p:pro){

        pro1.add(p.id);

 

    }

if(!pro.isEmpty()){

delete pro;

}

  • January 08, 2011
  • Like
  • 0

i have written trigger on opportunity and it should delete things in related list , but output is not expected

triggercode:

 

trigger deleteopportunity on Opportunity (before delete) {

list<string> opp1= new List<String>();
list<string> d1= new List<String>();
list<d__c>d;
      for(Opportunity o : Trigger.old){
        
    opp1.add ( o.Id );
  }
  d= [select id,name,Opportunity__c from d__c where Opportunity__c IN:opp1];
  for(d__c d2:d){
   d1.add(d2.id);
   }

clsdeleteopportunity.deleteall(d1);

}

 

class code:

public with sharing class clsdeleteopportunity{
    @future
 public static void deleteall(list<string> oppid)
 {

   
list<d__c>d=new List<d__c>();

list<string> d1=new List<string>();

d= [select id,name,Opportunity__c from d__c where Opportunity__c IN:oppid ];
 for(d__c d11:d){
        d1.add(d11.id);
        
    }
if(!d.isEmpty()){
delete d;
}

  • January 08, 2011
  • Like
  • 0
Hi All,

I need little help in developing below pattern:

I tried so many things but keeping header as common means , we need to work with HTML tables .
So, i have used Html table with nested repeats, but I want that child line item should also come in different rows , but in my case , I am getting all line items in same row.Please suggest , how to resolve this??
column1     column2     column3       column4     column5
p1                  p2         plineitem1   plineitem12   plineitem112
a1                  a2
c1                  c2         clineitem1   clineitem11   plineitem112
                                  clineitem2   clineitem12   clineitem112
                                  clineitem3   clineitem13   clineitem112
d1                  d2         dlineitem1   dlineitem12   dlineitem112    

currently,

<table width="100%" cellspacing="0" cellpadding="0" style="border:solid 1px #cccccc"  class="list " rules="all" >
  <thead>
    <tr class="headerRow">
    <th class="headerRow"> column1  </th>
    <th class="headerRow"> column2</th>
      <th class="headerRow">column3</th>
      <th class="headerRow" >column4</th>
        <th class="headerRow" >column5</th>
</thead>

<tbody>

 <apex:repeat value="{!items_to_approve}" var="item_to_approve"  >

   <apex:repeat value="{!wrapper}" var="qlist"  >
   <tr class="dataRow">
    <td>{!item_to_approve.name}</td>
    <td>{!item_to_approve.id}</td>
    <td>{!qlist.qrec.id}</td>
<td>{!qlist.qrec.name}</td>
<td>{!qlist.qrec.phone}</td>
    </tr>

  </apex:repeat>
</apex:repeat>
</tbody>

</table>

but still , m not able to get the desired output.please help
  • February 12, 2015
  • Like
  • 0
We are having a Vf page in which we have used action function and  on "oncomplete" event we are running some other functionality.
But there are few validation errors in the system , which are coming onVf page  , In that case Oncomplete should not fire but this is not happening .
we have put try catch block and maintaining a boolean variable to check the exception , but it seems that variable is not getting updated in catch block whenever there is any exception


 <apex:actionFunction action="{!Savedetail}" name="InsertRecord_JS" Rerender="pb1" status="actstatuspp"  oncomplete="CallWebService_JS({!detailerr});"/>


This varaible is always coming as false , even we have make it false in the controller in the catch block.

Please suggest
  • December 05, 2014
  • Like
  • 0

Hi All,

 

I need to insert question and all associated answer with those questions , questions could be multiple and answer for single question could be multiple.

I am having a map and I am putiing values to that map, but when I tried to get the value and debug those keyset values then those values have changed.

Here , is the code snippet:

map<Questions__c,list<Answers__c>> quesans= new map<Questions__c,list<Answers__c>>();

 

//in this map , I am putting the values. Here ques is question instance and allans is list of answers

  quesans.put(ques,allans); 

 

Then , i need to insert questions first as there's master-detail relationship between question and answers:But this statement is coming as null , blow is the code:

 

ist<Questions__c>qq=new list<Questions__c>();
qq.addall(quesans.keyset());

insert qq;

for(Questions__c q:qq){
if(quesans.get(q)!= Null){   // but this is coming null while map is returning correct values???
for(Answers__c a : quesans.get(q)){
a.Questions__r = q ;
anss.add(a);
}
}

 

if any one found/got the issue please help me out.Thanks in advance

 

  • August 14, 2012
  • Like
  • 0

We have 1 VF page. We have added link of this VF page from standard page layout. We have provided access of this VF page to some selected profiles. Rest of the profiles can not access the VF page  but they see the below error message on Standard page-

 

"Content can not be displayed: You have insufficient privileges to access the page"

 

Can somebody help us how to remove this error for the users who do not have access to VF page. We can create new page layout but we don't want to create this because we have plenty of page layout in our org.

Hello,

 

Not sure this is the right forum for this topic, if not please kindly suggest alternative forum.

 

Looking for information on how to setup the mechanism to pull/decrypt and load in Salesforce objects encrypted CSV files containing customers information and hosted on SFTP server. 

 

Would be glad to receive suggections on recommended procedures, tools and best practices.

 

Thanks,

S

 

 

 

 

Hi,

I'm using Force.com Flow, the new function available in Spring '11. Is there a way to populate a Flow variable from a URL parameter?

I'd like to create a custom link on the Account detail page that will launch a Flow and pass the Account ID to the Flow as a parameter. I've read through the Flow documentation and searched the message boards but I haven't found an example. Thanks for any help.

  • February 03, 2011
  • Like
  • 0

i have written trigger on opportunity and it should delete things in related list , but output is not expected

triggercode:

 

trigger deleteopportunity on Opportunity (before delete) {

list<string> opp1= new List<String>();
list<string> d1= new List<String>();
list<d__c>d;
      for(Opportunity o : Trigger.old){
        
    opp1.add ( o.Id );
  }
  d= [select id,name,Opportunity__c from d__c where Opportunity__c IN:opp1];
  for(d__c d2:d){
   d1.add(d2.id);
   }

clsdeleteopportunity.deleteall(d1);

}

 

class code:

public with sharing class clsdeleteopportunity{
    @future
 public static void deleteall(list<string> oppid)
 {

   
list<d__c>d=new List<d__c>();

list<string> d1=new List<string>();

d= [select id,name,Opportunity__c from d__c where Opportunity__c IN:oppid ];
 for(d__c d11:d){
        d1.add(d11.id);
        
    }
if(!d.isEmpty()){
delete d;
}

  • January 08, 2011
  • Like
  • 0