1 Reply Latest reply on Aug 22, 2012 1:32 PM by jiyong

    Not able to associate Position With a new Emplyee object using Data Bean


      I am working on a POC to add an Employee using Data Bean.

      I have used setFieldValue() method of SiebelBusComp class to add value to attributes such as "Login Name", "Last Name", "First Name", "Job Title", "Password".
      With all these attributes set I get an error such as "Employees are required to hold at least one position. Please associate this employee with a position (SBL-APS-00144)".

      When I add value to "Position" attribute using setFieldValue() method I get an error such as "This operation is not available for read only field 'Position' (SBL-DAT-00402)".

      Below is an excerpt of what my code looks like.

      m_busObject = m_dataBean.getBusObject("Employee");
      m_busComp = m_busObject.getBusComp("Employee");

      m_busComp.setFieldValue("Login Name", "SADMIN");
      m_busComp.setFieldValue("Last Name", "Shah");
      m_busComp.setFieldValue("First Name", "Deven");
      m_busComp.setFieldValue("Job Title", "CEO");
      m_busComp.setFieldValue("Password", "password");
      m_busComp.setFieldValue("Position", "Sales Manager");


      Can anyone please help me understand how I can associate an already existing Position with a new Employee object?