0 Replies Latest reply on Oct 31, 2012 1:09 PM by 949915

    Siebel data bean returning wrong value for Employee's Organization field


      I am trying to fetch Employee records from Siebel using Java Data Bean Apis.
      I am using Siebel 8.2 server & data bean jars.

      I am trying to fetch an Employee's records in which I have few single value fields and few multi value fields.
      Issue here is with fetching Organization field for an employee.
      When I fetch this field using business comp method getMBVBusComp("Organization"), values which are returned are either of "Position" fields or multiple redundant values of an Organization.

      My code looks like below,

      m_busObject = m_dataBean.getBusObject("Employee");
           m_busComp = m_busObject.getBusComp("Employee");
           SiebelPropertySet oPsDR_Header= m_dataBean.newPropertySet();
           SiebelPropertySet lPS_values= m_dataBean.newPropertySet();
           oPsDR_Header= m_dataBean.newPropertySet();
           lPS_values= m_dataBean.newPropertySet();
           oPsDR_Header.setProperty("Login Name","");

                m_busComp.activateField("Login Name");
                m_busComp.setSearchSpec("Login Name","John");
                     m_busComp.getMultipleFieldValues(oPsDR_Header, lPS_values);     
           System.out.println("Name" +lPS_values.getProperty("Name"));
                System.out.println("================" );
                System.out.println("EMPLOYEE Login Name: " + lPS_values.getProperty("Login Name"));
                System.out.println("================" );
                m_Pos = m_busComp.getMVGBusComp("Organization");
                System.out.println("==========" );
                System.out.println("Organization:" );
                System.out.println("==========" );
                     //Get the value from the output property set.
                } while (m_Pos.nextRecord());

      Here values which are printed are of Positions which are associated with this Employee & not Organizations.

      Can someone help me understand this behavior?

      Is there any thing that I am doing wrong?

      Thanks in advance!!