My Oracle Support Banner

Default Fields When A Certain User Clicks Create New Request (Doc ID 2552913.1)

Last updated on DECEMBER 22, 2020

Applies to:

Oracle Fusion B2B Service Cloud Service - Version 11.13.19.01.0 and later
Information in this document applies to any platform.

Goal

On : 11.13.19.01.0 version, Service Requests
 Customer wants to apply the following to their environment:

When a certain user clicks "Create new request" the following fields are set with the following values:

· Type of Call – Critical Value Result

· Request Type – Laboratory

· Reason – Other

· Action – Contact Client

· Status – Closed

They have tried writing the code multiple ways:
Option 1
 
// Get the security context
def secCtx = adf.context.getSecurityContext()
// get the current user's name
def user = secCtx.getUserName()

if (user == "user@test.ex")
setAttribute(TypeOfCall_c,'Critical Value Result')
setAttribute(RequestType_c, 'Laboratory')
setAttribute(Reason_c, 'Other')
setAttribute(Action_c, 'Contact Client')
setAttribute(StatusCd, 'CLOSED')
else
  return

Option 2:

if (AssignedTo == "user@test.ex")
setAttribute(TypeOfCall_c,'Critical Value Result')
setAttribute(RequestType_c, 'Laboratory')
setAttribute(Reason_c, 'Other')
setAttribute(Action_c, 'Contact Client')
setAttribute(StatusCd, 'CLOSED')
else
  return

They are still either receiving errors or not getting any errors and it is is just not performing.


 

Solution

To view full details, sign in with your My Oracle Support account.

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


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.