Sales, Marketing, and Territories Apps - EBS (MOSC)

MOSC Banner

Oracle Fusione - Groovy Script insert row in a related collection

Hi, i need to insert a row with groovy in a related collection of object partner. I try with this code:

def vo3 = newView('PartnerProfileOrgPartyPVO');
def vc3 = vo3.createViewCriteria();
def vcRow3 = vc3.createRow();
def vc4 = vcRow3.ensureCriteriaItem("OrganizationName");
vc4.setOperator("=");
vc4.setValue('BIMRCO01');
vc3.insertRow(vcRow3);
vo3.appendViewCriteria(vc3);
vo3.executeQuery();

if (vo3.hasNext()) 
{
def row = vo3.next() 
def vo1 =row.LegameGerarchicoSuperiore_Legame_Tgt
def createRecord = vo1.createRow()
createRecord.setAttribute('RecordName','ASCXVX09')
createRecord.setAttribute('CodiceVenditore2_c','BIMRCO01')
createRecord.setAttribute('SkipTrigger_c','Y')
def defaultDate = date(2049, 12, 31);
createRecord.setAttribute('DataFineLegame_c',defaultDate)
vo1.insertRow(createRecord)
}

When the parent hasn't record in the collection the insert is ok, but if it has some records i have the error "RecordName is required" also if i use createRecord.setAttribute('RecordName','ASCXVX09').

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

EBS Sales Tags

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center