• Ahmed Abbas
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

I want to create a Task after saving a customer Object.
In my Customer Object I give a User FIeld: Editor.
I try with this Code

Code:
task.WhatId = Object.id;
task.WhoId = Object.Editor__c;
task.Subject = 'Other';
task.priority= Object.Priority__c;
task.status = 'Not Started';
task.description = 'New  Work';
insert task;

 And I become this failure:

Attempt to de-reference a null object

Do you have an Idea to help me?

Thx

Magda




Message Edited by magda on 02-13-2008 12:32 AM
  • February 08, 2008
  • Like
  • 0