Task Is Not Creating With Server Scripts (web Services) (Doc ID 1902656.1)

Last updated on JULY 27, 2017

Applies to:

Oracle Fusion CRM Application Composer Cloud Service - Version 11.1.7.0.0 to 11.1.9.2.0 [Release 1.0]
Information in this document applies to any platform.

Symptoms



Task is not creating with server scripts (web services)



STEPS TO REPRODUCE

Business Object :: Opportunity
Trigger Name :: Before Update in Database
Code ::

try {

def taskRow =
[

TaskName : "Task Name " + Name,
DueDt : today() + 5,
SourceObjectCd:"OPPORTUNITY",
SourceObjectId:OptyId
]

def task = adf.webServices.Task.createTask(taskRow);
println('CreateTask: created task with ID ' + task.get('TaskId'));
} catch(ex) {
println('CreateTask err: ' + ex.getClass().getName() + ' Message:' +
ex.getMessage());
return true;
}

Exception :: CreateTask err: java.lang.NullPointerException Message:Cannot invoke method createTask() on null object (attached screen shot)












Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms