• Sreenath Reddy
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
trigger Practise2 on Student__c (after insert,After update) 
{
  Set<id> ids=new set<id>();
  for(Student__c stud1:trigger.new)  
  {
    ids.add(stud1.id);
  }
  
  list<Student__c> stud2=[select id,name,Status_from_Parent__c,College__r.id,College__r.Status__c from Student__c where id in:ids];
  list<College__c> lst=new list<College__c>();
  for (Student__c std3:stud2)
  {
   for(list<College__C> clg:std3.College__r)
   {
    clg.Status__c=std3.Status_from_Parent__c;
    lst.add(clg);
   }
  
  }
  update lst;
  
  }
@isTest(SeeAllData = true)

public class SurveyResponseTest
{
   public static testMethod void surRes()
   {
        Account acc1 = TestDataGenerator.createAccount('Acme');
        insert acc1;
        Opportunity opp1 = TestDataGenerator.createOpportunity('TM',acc1,Date.today(),'Closed Won');
        insert opp1;
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; 
        User u = new User(Alias = 'standt', Email='A.trivedi@demoorg.com', 
        EmailEncodingKey='UTF-8', LastName='devindrop', LanguageLocaleKey='en_US', 
        LocaleSidKey='en_US', ProfileId = p.Id, 
        TimeZoneSidKey='America/Los_Angeles', UserName='KFCempress31@Nagpurorg.com');
        insert u;
        System.runAs(u)
        {
            System.debug('Current User: ' + UserInfo.getUserName());
            System.debug('Current Profile: ' + UserInfo.getProfileId()); 
        }
      Survey__c sur1 = TestDataGenerator.createSurvey('Test','For testing',Date.today(),opp1);
      insert sur1;
      Question__c que1 = TestDataGenerator.createQuestion('Who',false,'Test','Test','Test','Test','Test','Test','Test','Test','Test','Test','Test','Radio',sur1);
      insert que1;
       Feedback__c fb1 = TestDataGenerator.createFedback('Ans',que1,'Test','Test','Test','Test','Test','Test','Test','Test','Test','Test',u);
       insert fb1;
        Test.startTest();
       
    
      
        ApexPages.CurrentPage().getparameters().put('id', sur1.id);
        ApexPages.StandardController controller = new  ApexPages.StandardController(sur1);
        SurveyResponse sr = new SurveyResponse(controller);
       
        sr.radio = true;
       
        sr.radiomethod();
        sr.Submitsurvey();
        Test.stopTest();
   }
}
Hi All,

Popup alert

Could someone please let us know if it is possible to remove the message " This Page at https://salesforce.com Says" from the pop up page. this is the normal javascript alert message.

Thank you,

Regards,
Christwin




 

HI there,

it's really confusing that how it is picking values by using {!filterId}
expression selectList component???

<apex:page standardController="Case" recordSetvar="cases">
    <apex:pageBlock >
        <apex:form id="theForm">
            <apex:panelGrid columns="2">
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                </apex:selectList>
            </apex:panelGrid>
            <apex:pageBlockSection >
                <apex:dataList var="c" value="{!cases}" id="list">
                    {!c.subject}
                </apex:dataList>
            </apex:pageBlockSection>
        </apex:form>
    </apex:pageBlock>
</apex:page>

if anyone knows it there than please update me..... thanks.. in advance :)

  • October 04, 2013
  • Like
  • 1