My Oracle Support Banner

Getting Incident Error While Trying To Capture Month & Year Of Date Through Groovy (Doc ID 2531796.1)

Last updated on APRIL 22, 2020

Applies to:

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

Symptoms

On : 11.13.19.01.0 version, Sales, Sales Catalog

Getting incident error while trying to capture month & year of date

We are trying to capture month and year of date field value using month(date) and year(date) codes as mentioned in the documentation:
https://docs.oracle.com/en/cloud/saas/sales/18c/cgsac/groovy-scripting-reference.pdf

We have added below code at before update trigger at Opportunity Revenue:
def closeDate = StartDate_c //get the closeDate
def numberThisMonth = month(closeDate); // get the month number from the date
setAttribute('NumberOfMonths_c',numberThisMonth)

When we are trying to modify the date and save the Opportunity, it is giving following incident error.


ERROR
-----------------------


An application error occurred. See the incident log for more information.

An application error has occurred. Your help desk can use the following information to obtain a more detailed description of this incident: 6, Server Domain: FADomain, Server Instance: UIServer_as1_03, Application Name: ORA_CRM_UIAPP.




STEPS
-----------------------
The issue can be reproduced at will with the following steps:
Create custom date field
Create custom text field
Use before update trigger on opportunity revenue and use above trigger
Go to opportunity revenue and change the date
Save
Get error

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot use before update trigger to set number of months

Cause

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
Symptoms
Cause
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.