5 Replies Latest reply: Nov 9, 2012 7:51 AM by user576183 RSS

    Create master-detail rows in Application Module Impl


      I'm running Studio Edition Version

      I need to programatically create master-detail rows from a method in my Application Module Impl.

      I'm using the code below, but am always told that the foreign key is required in the detail row: oracle.jbo.AttrValException: JBO-27014: Attribute UserId in UserPreferenceEO is required.

      Can anybody advise the correct way to do this?

      Many thanks

      NameValuePairs nvp = new NameValuePairs();
      RegisteredUsersVORowImpl userRow = (RegisteredUsersVORowImpl)getUsers().createAndInitRow(nvp);

      // Create userpref row
      // Get detail row via View Accessor on Master table