1 Reply Latest reply on Jan 29, 2008 7:25 PM by ntsiii

    Error #1009

    ldplay.tigran
      Hi please can somebody help me?
      I have a such kind of problem. I had an web service method that get 5 parameters, two of them are of DateTime type.
      When I'm calling the method this kind of error occurs: Error #1009: Cannot access a property or method of a null object reference.

      This is function in *.as file that calling the web method

      private function assignProject():void
      {
      if (currentState == STATE_ADDASSIGNMENT)
      {
      projectResourceTenroxKey = availableAssignmentList.selectedItem.TenroxKey;
      projectResourceEmployeeId = AllEmployeeGrid.selectedItem.Id;
      projectResourceStartDate = txtAddAssignmentStartDate.selectedDate;
      projectResourceEndDate = txtAddAssignmentEndDate.selectedDate;
      }
      if ((currentState == STATE_ADDASSIGNMENT && availableAssignmentList.selectedItem != null))
      {
      hrJugglerService.AssignProject.send();
      }

      this is in *.mxml file

      <mx:operation
      name="AssignProject"
      result="onAssignProjectResult(event)"
      fault="onFault(event)">
      <mx:request>
      <tenroxKey>asdas</tenroxKey>
      <employeeId>{projectResourceEmployeeId}</employeeId>
      <resourceType>Fulltime</resourceType>
      <startDate>
      {dateToMsec(txtAddAssignmentStartDate.selectedDate)}
      </startDate>
      <endDate>
      {dateToMsec(txtAddAssignmentEndDate.selectedDate)}
      </endDate>
      </mx:request>
      </mx:operation>

      And this is web method

      [WebMethod(true)]
      public void AssignProject(String tenroxKey, int employeeId, ResourceType resourceType,
      DateTime startDate, DateTime endDate)
      {
      TestRight(RIGHT_ADDPROJECTRESOURCE);
      try
      {
      hrJuggler.GetProjectManagerInstance().AssignProject(tenroxKey, employeeId, resourceType,
      startDate, endDate);
      }
      catch (Exception e)
      {
      ThrowSoapException(e);
      }
      }