You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

What is the View Object to use for creating new Lookup Code for Standard Lookups, via Groovy Script?

in Sales 6 comments

Summary:

I need to programmatically create a Lookup Code for an existing Standard Lookup Type via Groovy Script. I have found some sample scripts from Oracle documents, but it gives me an error.
def lookupVO = newView('FndLookupValuesVO')
def newRow = lookupVO.createRow()
newRow.setAttribute('LookupType', 'My Lookup Type')
newRow.setAttribute('LookupCode', 'My Lookup Code')
newRow.setAttribute('Meaning', 'My Lookup Meaning')
newRow.setAttribute('EnabledFlag', 'Y')
newRow.setAttribute('StartDateActive', new Date())
lookupVO.insertRow(newRow)
lookupVO.getApplicationModule().getTransaction().commit()

This code does not allow me to save the code with error "Error(1,1) : An internal compiler error occurred: oracle.jbo.NoDefException: JBO-25092: Programmatically accessible view object definition FndLookupValuesVO is not found. See the logs for the error stack.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!