0 Replies Latest reply: Nov 26, 2012 6:30 PM by 954933 RSS

    characterstics updating (replacing with existing) via BO issue?

      Hello i have crated a BO for updating(replacing with existing) the existing Characteristics, basically want to overwrite the existing char values. the schema i have created to do this as follows

      BO Name: CmPremChUpd

      <premiseId mapField="PREM_ID"/>
      <premiseCharacteristic type="list" mapChild="CI_PREM_CHAR">
      <characteristicType mapField="CHAR_TYPE_CD"/>
      <effectiveDate mapField="EFFDT" default="%CurrentDate"/>
      <characteristicValue mapField="CHAR_VAL" default=""/>
      <adhocCharacteristicValue mapField="ADHOC_CHAR_VAL" default=" "/>
      <version mapField="VERSION"/>

      in my BPA i am have written following code ..

      default $CmPrmCharUp as 'CmPremChUpd';
      declareBO $CmPrmCharUp as 'CmPremChUpd';
      if ("string (CM_PRM_UI/bo/parcelId) != $BLANK")
      move null to "CmPremChUpd";
      move "$premiseId" to "CmPremChUpd/premiseId";
      move 'WTRCOM' to "CmPremChUpd/+premiseCharacteristic/characteristicType";
      move "$wtrComVal" to "CmPremChUpd/premiseCharacteristic[last()]/adhocCharacteristicValue";
      move "$CURRENT-DATE" to "CmPremChUpd/premiseCharacteristic[last()]/effectiveDate";
      move "1" to "CmPremChUpd/premiseCharacteristic[last()]/version";
      invokeBO $CmPrmCharUp using "CmPremChUpd" for replace;
      if ("$ERROR")

      when i exicute i am getting the following error,
      Detail of Schema input error: BO Replace action for BO BusinessObject_Id(CmPrmCharAddBO1) with request <CmPremChUpd><premiseId>0132173400</premiseId><premiseCharacteristic><characteristicType>RCL_SORC</characteristicType><adhocCharacteristicValue>0132173400</adhocCharacteristicValue><effectiv
      eDate>2012-11-26</effectiveDate><version>1</version></premiseCharacteristic></CmPremChUpd> requires the version to be supplied.

      i tried different things like keeping the version and adding the version in BO schema, but still no luck. Appreciate if any one has solution to resolve this.