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("Position", "Sales Manager");
Can anyone please help me understand how I can associate an already existing Position with a new Employee object?
Position is a Multi-Value Field.
Position can contain multiple values (records).
I think you need to use the GetMVGBusComp and possibly the GetAssocBusComp Business Component methods.
You can read in the Bookshelf a bit more on that.
(Siebel) Object Interfaces Reference > 4 Interfaces Reference > Business Component Methods