• Sheffy
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 5
    Replies

Hi,

 

I want to add value in RelatedList of  Notes and Attachment From My custom field.

Is it possible,to acheive this ?

 

Thanks.

 

  • April 05, 2011
  • Like
  • 0

HI,

 

Please Help me in writing Test Class for this :

 

 

public class CancelCase {

    public String strCaseId = ApexPages.currentPage().getParameters().get('id');
    public String strClosingComments {get; set;}    
    public Case objCancelCase {get; set;}
    public List<CaseComment> objCancelCaseCommentList {get; set;}
    
    public CancelCase(ApexPages.StandardController controller) {
        strClosingComments ='';
        objCancelCaseCommentList = [Select Id, ParentId, IsPublished, CommentBody, CreatedById, CreatedDate, SystemModstamp,
                                    LastModifiedDate, LastModifiedById, IsDeleted, ConnectionReceivedId, ConnectionSentId
                                    From CaseComment where ParentId =:strCaseId ];
       }
    
    public List<SelectOption> getStatus(){
      List<SelectOption> options = new List<SelectOption>();
      Schema.DescribeFieldResult fieldResult = Case.Status.getDescribe();
      options.add(new SelectOption('Cancelled', 'Cancelled'));
      return options;
      }
    
    public PageReference save() {
   
      PageReference createCancelCase;
      try{
       if(strClosingComments==null || strClosingComments==''){
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'You must enter Comments'));
              return null;
       }
    
        CaseComment  objLatestCancelComment = new CaseComment();
        objLatestCancelComment.ParentId = strCaseId;
        objLatestCancelComment.CommentBody= strClosingComments;
        objCancelCaseCommentList.add(objLatestCancelComment);
        upsert objCancelCaseCommentList ;
        
        //strCaseId
        Case caseBeingCancelled = [Select Status From Case where Id=:strCaseId];
        caseBeingCancelled.Status = 'Cancelled';
        update caseBeingCancelled;
        
        createCancelCase = new PageReference('/'+strCaseId);
        createCancelCase.setRedirect(TRUE);
 
        }catch(Exception e){
          }
      return createCancelCase ;

}

}

  • March 25, 2011
  • Like
  • 0

HI,

 

Please Help me in writing Test Class for this :

 

 

public class CancelCase {

    public String strCaseId = ApexPages.currentPage().getParameters().get('id');
    public String strClosingComments {get; set;}    
    public Case objCancelCase {get; set;}
    public List<CaseComment> objCancelCaseCommentList {get; set;}
    
    public CancelCase(ApexPages.StandardController controller) {
        strClosingComments ='';
        objCancelCaseCommentList = [Select Id, ParentId, IsPublished, CommentBody, CreatedById, CreatedDate, SystemModstamp,
                                    LastModifiedDate, LastModifiedById, IsDeleted, ConnectionReceivedId, ConnectionSentId
                                    From CaseComment where ParentId =:strCaseId ];
       }
    
    public List<SelectOption> getStatus(){
      List<SelectOption> options = new List<SelectOption>();
      Schema.DescribeFieldResult fieldResult = Case.Status.getDescribe();
      options.add(new SelectOption('Cancelled', 'Cancelled'));
      return options;
      }
    
    public PageReference save() {
   
      PageReference createCancelCase;
      try{
       if(strClosingComments==null || strClosingComments==''){
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'You must enter Comments'));
              return null;
       }
    
        CaseComment  objLatestCancelComment = new CaseComment();
        objLatestCancelComment.ParentId = strCaseId;
        objLatestCancelComment.CommentBody= strClosingComments;
        objCancelCaseCommentList.add(objLatestCancelComment);
        upsert objCancelCaseCommentList ;
        
        //strCaseId
        Case caseBeingCancelled = [Select Status From Case where Id=:strCaseId];
        caseBeingCancelled.Status = 'Cancelled';
        update caseBeingCancelled;
        
        createCancelCase = new PageReference('/'+strCaseId);
        createCancelCase.setRedirect(TRUE);
 
        }catch(Exception e){
          }
      return createCancelCase ;

}

}

  • March 25, 2011
  • Like
  • 0

HI,

 

Please Help me in writing Test Class for this :

 

 

public class CancelCase {

    public String strCaseId = ApexPages.currentPage().getParameters().get('id');
    public String strClosingComments {get; set;}    
    public Case objCancelCase {get; set;}
    public List<CaseComment> objCancelCaseCommentList {get; set;}
    
    public CancelCase(ApexPages.StandardController controller) {
        strClosingComments ='';
        objCancelCaseCommentList = [Select Id, ParentId, IsPublished, CommentBody, CreatedById, CreatedDate, SystemModstamp,
                                    LastModifiedDate, LastModifiedById, IsDeleted, ConnectionReceivedId, ConnectionSentId
                                    From CaseComment where ParentId =:strCaseId ];
       }
    
    public List<SelectOption> getStatus(){
      List<SelectOption> options = new List<SelectOption>();
      Schema.DescribeFieldResult fieldResult = Case.Status.getDescribe();
      options.add(new SelectOption('Cancelled', 'Cancelled'));
      return options;
      }
    
    public PageReference save() {
   
      PageReference createCancelCase;
      try{
       if(strClosingComments==null || strClosingComments==''){
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.error,'You must enter Comments'));
              return null;
       }
    
        CaseComment  objLatestCancelComment = new CaseComment();
        objLatestCancelComment.ParentId = strCaseId;
        objLatestCancelComment.CommentBody= strClosingComments;
        objCancelCaseCommentList.add(objLatestCancelComment);
        upsert objCancelCaseCommentList ;
        
        //strCaseId
        Case caseBeingCancelled = [Select Status From Case where Id=:strCaseId];
        caseBeingCancelled.Status = 'Cancelled';
        update caseBeingCancelled;
        
        createCancelCase = new PageReference('/'+strCaseId);
        createCancelCase.setRedirect(TRUE);
 
        }catch(Exception e){
          }
      return createCancelCase ;

}

}

  • March 25, 2011
  • Like
  • 0

HI,

I want to know that how would i refresh Parent Window on Clicking of Save/Submit button on PopUp window or we can say Child window.

For this I used JavaScript ;

 

<script language="JavaScript" type="text/javascript">
 function CloseAndRefresh(){

      opener.location.reload(true);
      self.close();
  }
</script>

On Submit :

 

<apex:commandButton action="{!save}" onclick="CloseAndRefresh()" value="Save"/>

 

But It doesn't Work .

Please Help ..

  • March 17, 2011
  • Like
  • 0

HI,

I want to know that how would i refresh Parent Window on Clicking of Save/Submit button on PopUp window or we can say Child window.

For this I used JavaScript &colon;

 

<script language="JavaScript" type="text/javascript">
 function CloseAndRefresh(){

      opener.location.reload(true);
      self.close();
  }
</script>

On Submit :

 

<apex:commandButton action="{!save}" onclick="CloseAndRefresh()" value="Save"/>

 

But It doesn't Work .

Please Help ..

 

 

  • March 17, 2011
  • Like
  • 0

Hi

 

i had installed an application from appexchange,now i want to know how to run that apps.

 

Please tell me.

 

  • February 11, 2011
  • Like
  • 0

Hi

i want to show 'answer' tab in my custom profile say 'sales agent' under different application.

but i was not able to show this.please help

 

thanks.

  • February 10, 2011
  • Like
  • 0

Hi,

 

I had created a page, in which i want to show values from another page i.e i want to show values from Account page to My page for which I had chosen formula field as data type, but the page is not showing any value .

 

Please help .

 

Thanks

  • January 27, 2011
  • Like
  • 0

Hi,

 

I had created a page, in which i want to show values from another page i.e i want to show values from Account page to My page for which I had chosen formula field as data type, but the page is not showing any value .

 

Please help .

 

Thanks

  • January 27, 2011
  • Like
  • 0

Hi,

 

i want to create a Tip Of Day, i.e. a small pop up window open with data.

How To create this one ??

 

thanks ,- Sheffy

  • January 24, 2011
  • Like
  • 0

Hi,

 

I want to know the page load time for my created page ??

how should i know.

Please help .

 

thanks, sheffy

  • January 24, 2011
  • Like
  • 0

HI,

I want to know that how would i refresh Parent Window on Clicking of Save/Submit button on PopUp window or we can say Child window.

For this I used JavaScript ;

 

<script language="JavaScript" type="text/javascript">
 function CloseAndRefresh(){

      opener.location.reload(true);
      self.close();
  }
</script>

On Submit :

 

<apex:commandButton action="{!save}" onclick="CloseAndRefresh()" value="Save"/>

 

But It doesn't Work .

Please Help ..

  • March 17, 2011
  • Like
  • 0

Hi

 

i had installed an application from appexchange,now i want to know how to run that apps.

 

Please tell me.

 

  • February 11, 2011
  • Like
  • 0

Hi

i want to show 'answer' tab in my custom profile say 'sales agent' under different application.

but i was not able to show this.please help

 

thanks.

  • February 10, 2011
  • Like
  • 0

Hi,

 

I want to know the page load time for my created page ??

how should i know.

Please help .

 

thanks, sheffy

  • January 24, 2011
  • Like
  • 0