• Rashi Garg 30
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
When I place a system.debug statement inside a method, it doesn't show up in the log.  If it is not inside a method, it works fine.  Am I doing something wrong?
           <apex:repeat value="{!FormList}" var="f">
                        <apex:variable var="count" value="{!0}" />
                             <apex:repeat value="{!f.categories}" var="c">
                                 <apex:repeat value="{!c.tasks__r}" var="t" >
                                     <tr>
                                              <td>{!t.Task_Name__c}</td>
                                              <td><apex:inputField value="{!f.siteSelectionChilds[count].LQ_Owner_Responsible__c}"  /></td>
                                              <td><apex:inputField value="{!f.siteSelectionChilds[count].LQ_Date_Completed__c}"  /></td>
                                              <td><apex:inputField value="{!f.siteSelectionChilds[count].LQ_Comments__c}"/></td>
                                    <apex:variable var="count" value="{!count+1}" />
                                    </tr>
                                 </apex:repeat>
                             </apex:repeat>
                    </apex:repeat>
                              

hi above is my code in loop i am trying to insert the siteSelectionChilds data but i am unable to get the entered values to my apex class pls suggest any one
I am trying to send the user to the Oppty products page for a particular oppty ,  This is taking the user to the individual oppty product , How to send the user to list of oppty products?
 
<td>
                          <apex:outputLink value="/{!p.id}/e?retURL=/{!Opportunity.id}"
                             target="_top" style="color:blue ;" >Edit All</apex:outputLink> 
                        </td>
Advance thanks :)
 
Hi all.

here is my code . how can i achieve 100% code coverage for this Trigger?



trigger CopyAttachments on SVMXC__Service_Order__c(after insert)
{
 //Attachment[] attList = [select id, name, body from Attachment where ParentId = :Trigger.new[0].SVMXC__Case__c];
 Attachment[] insertAttList = new Attachment[]{};
 
         for(Attachment a: [select id, name, body from Attachment where ParentId = :Trigger.new[0].SVMXC__Case__c])
         {
               Attachment att = new Attachment(name = a.name, body = a.body, parentid = Trigger.new[0].id);
               insertAttList.add(att);
         }
       if(insertAttList.size() > 0)
       {
            insert insertAttList;
       }
 
}
  • November 16, 2016
  • Like
  • 1
I am currently working on survey to display a random questions, For that i need to update random numbers to a sobject. But System.NullPointerException: occurred in my code.

Apex:
public class update_random_question 
{
public   List<Question__c> scope{get;set;}
public update_random_question()
{
    for(Question__c a : scope)
    {
        a.orderby__c = randomizer.getRandomNumber(100);            
    }
update scope;
} }

VF:​
<apex:page controller="update_random_question">
    <apex:form>
        <apex:commandButton Value="Begin" action="{!update_random_question}"/>
    </apex:form>
</apex:page>

Notes: randomizer.getRandomNumber