• D.Younai
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies

Hi,Community!

 

I tried Site.com.

But, There is no "Publish Changes" button in my development environment.

I can not do "Manage Domains".

 

What do you have to be able to do?

 

Regards,

Hi, Comunity!

 

I am trying to update the record using the SOAP API.
But when I put the dates in a custom date field, registered in the date one day prior.

 

Example)
I want to register the day: 2012/08/02
Days that are actually registered: 2012/08/01

 

I described the results of the trace.

java.util.GregorianCalendar[time=1343833200000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Asia/Tokyo",offset=32400000,dstSavings=0,useDaylight=false,transitions=10,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2012,MONTH=7,WEEK_OF_YEAR=31,WEEK_OF_MONTH=1,DAY_OF_MONTH=2,DAY_OF_YEAR=215,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=32400000,DST_OFFSET=0

 

Please help me.

 

Regards,

Hi,Community.

 

I have a test in the following code.

Test was Success,

But Test Code coverage is 0%.

 

 I want to 100% test coverage.

Please tell me what to do?

 

@isTest
public with sharing class LogACallControllerExtension {
    
    public Task task;
    
    ApexPages.Standardcontroller controller;
    
    public LogACallControllerExtension(ApexPages.StandardController controller) {
        this.task = (Task)controller.getRecord();
        User u = [Select Id From User Where id = :UserInfo.getUserId()];
//        List<Lead> lead = [Select Id,Email,Phone From Lead Where Lead.Id =:ApexPages.currentPage().getParameters().get('who_id')];
//        task.WhoId = lead[0].Id;
        task.WhoId = ApexPages.currentPage().getParameters().get('who_id');
        task.WhatId = ApexPages.currentPage().getParameters().get('what_id');
        task.Status = ApexPages.currentPage().getParameters().get('tsk12');
        task.OwnerId = u.Id;
    }
    
    
    public PageReference save() {
        Task t = new Task();
        t.ownerId = task.ownerId;
        t.status = task.status;
        t.subject = task.subject;
        t.whoId = task.whoId;
        t.activityDate = task.activityDate;
        t.Description = task.Description;
        insert t;   
        return null;
    }


static testmethod void LogACallControllerExtension(){
 
      Task task = new Task();
        task.ownerId = '005U0000000NadXIAS';
        task.status = 'Completed';
        task.subject = 'Call';
        task.whoId = '00QU0000002mMkw';
        task.activityDate = date.parse('2012/07/18');
        task.Description = 'test data';
      Insert task;

   PageReference pageRef = Page.instask;
   Test.setCurrentPage(pageRef);
        pageRef.getParameters().put('who_id','00QU0000002mMkw');
        pageRef.getParameters().put('tsk12','Completed');

   ApexPages.Standardcontroller std = new ApexPages.standardcontroller(task);
  LogACallControllerExtension lcall = new LogACallControllerExtension(std);
  Task TaskL = [select Id,description,ownerId,status,subject,activitydate from Task where activitydate = :date.parse('2012/07/18')];
  system.assertequals(TaskL.ownerId,'005U0000000NadXIAS');
  system.assertequals(TaskL.description,'test data');
  system.assertequals(TaskL.activitydate,date.parse('2012/07/18'));
  system.assertequals(TaskL.status,'Completed');
  system.assertequals(TaskL.subject,'Call');
 lcall.save();
 
}

}

 

Thanks.

 

Hi,Community!

 

I want to test the following code.

Plead tell me how to write test code.

 

public with sharing class LogACallControllerExtension {
    
    public Task task;
    
    ApexPages.Standardcontroller controller;
    
    public LogACallControllerExtension(ApexPages.StandardController controller) {
        this.task = (Task)controller.getRecord();
        User u = [Select Id From User Where id = :UserInfo.getUserId()];
        List<Lead> lead = [Select Id,Email,Phone From Lead Where Lead.Id =:ApexPages.currentPage().getParameters().get('who_id')];
        task.WhoId = lead[0].Id;
        task.WhatId = ApexPages.currentPage().getParameters().get('what_id');
        task.Status = ApexPages.currentPage().getParameters().get('tsk12');
        task.OwnerId = u.Id;
    }
    
   
    public PageReference save() {
        Task t = new Task();
        t.ownerId = task.ownerId;
        t.status = task.status;
        t.subject = task.subject;
        t.whoId = task.whoId;
        t.activityDate = task.activityDate;
        t.Description = task.Description;
        insert t;   
        return null;
    }

}

 Thanks.

Hi, Comunity!

 

I am trying to update the record using the SOAP API.
But when I put the dates in a custom date field, registered in the date one day prior.

 

Example)
I want to register the day: 2012/08/02
Days that are actually registered: 2012/08/01

 

I described the results of the trace.

java.util.GregorianCalendar[time=1343833200000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Asia/Tokyo",offset=32400000,dstSavings=0,useDaylight=false,transitions=10,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2012,MONTH=7,WEEK_OF_YEAR=31,WEEK_OF_MONTH=1,DAY_OF_MONTH=2,DAY_OF_YEAR=215,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=32400000,DST_OFFSET=0

 

Please help me.

 

Regards,

Hi,Community.

 

I have a test in the following code.

Test was Success,

But Test Code coverage is 0%.

 

 I want to 100% test coverage.

Please tell me what to do?

 

@isTest
public with sharing class LogACallControllerExtension {
    
    public Task task;
    
    ApexPages.Standardcontroller controller;
    
    public LogACallControllerExtension(ApexPages.StandardController controller) {
        this.task = (Task)controller.getRecord();
        User u = [Select Id From User Where id = :UserInfo.getUserId()];
//        List<Lead> lead = [Select Id,Email,Phone From Lead Where Lead.Id =:ApexPages.currentPage().getParameters().get('who_id')];
//        task.WhoId = lead[0].Id;
        task.WhoId = ApexPages.currentPage().getParameters().get('who_id');
        task.WhatId = ApexPages.currentPage().getParameters().get('what_id');
        task.Status = ApexPages.currentPage().getParameters().get('tsk12');
        task.OwnerId = u.Id;
    }
    
    
    public PageReference save() {
        Task t = new Task();
        t.ownerId = task.ownerId;
        t.status = task.status;
        t.subject = task.subject;
        t.whoId = task.whoId;
        t.activityDate = task.activityDate;
        t.Description = task.Description;
        insert t;   
        return null;
    }


static testmethod void LogACallControllerExtension(){
 
      Task task = new Task();
        task.ownerId = '005U0000000NadXIAS';
        task.status = 'Completed';
        task.subject = 'Call';
        task.whoId = '00QU0000002mMkw';
        task.activityDate = date.parse('2012/07/18');
        task.Description = 'test data';
      Insert task;

   PageReference pageRef = Page.instask;
   Test.setCurrentPage(pageRef);
        pageRef.getParameters().put('who_id','00QU0000002mMkw');
        pageRef.getParameters().put('tsk12','Completed');

   ApexPages.Standardcontroller std = new ApexPages.standardcontroller(task);
  LogACallControllerExtension lcall = new LogACallControllerExtension(std);
  Task TaskL = [select Id,description,ownerId,status,subject,activitydate from Task where activitydate = :date.parse('2012/07/18')];
  system.assertequals(TaskL.ownerId,'005U0000000NadXIAS');
  system.assertequals(TaskL.description,'test data');
  system.assertequals(TaskL.activitydate,date.parse('2012/07/18'));
  system.assertequals(TaskL.status,'Completed');
  system.assertequals(TaskL.subject,'Call');
 lcall.save();
 
}

}

 

Thanks.

 

Hi,Community!

 

I want to test the following code.

Plead tell me how to write test code.

 

public with sharing class LogACallControllerExtension {
    
    public Task task;
    
    ApexPages.Standardcontroller controller;
    
    public LogACallControllerExtension(ApexPages.StandardController controller) {
        this.task = (Task)controller.getRecord();
        User u = [Select Id From User Where id = :UserInfo.getUserId()];
        List<Lead> lead = [Select Id,Email,Phone From Lead Where Lead.Id =:ApexPages.currentPage().getParameters().get('who_id')];
        task.WhoId = lead[0].Id;
        task.WhatId = ApexPages.currentPage().getParameters().get('what_id');
        task.Status = ApexPages.currentPage().getParameters().get('tsk12');
        task.OwnerId = u.Id;
    }
    
   
    public PageReference save() {
        Task t = new Task();
        t.ownerId = task.ownerId;
        t.status = task.status;
        t.subject = task.subject;
        t.whoId = task.whoId;
        t.activityDate = task.activityDate;
        t.Description = task.Description;
        insert t;   
        return null;
    }

}

 Thanks.