5 Replies Latest reply on Aug 13, 2012 7:08 AM by Gurumoorthy

    Development :create a new SA Id with a defined user Id using NewEntity() !


      I try to create a new SA Id with a defined Id ( see code below), I expected that the Framwork creates the Service Agreement with my Id, but not, it generates a new Id. Please help on that, how I can create my SA with my specific Id.

                     ServiceAgreement serviceAgreement = null;
                     ServiceAgreement_DTO saDTO = null;
                     ServiceAgreementType_Id serviceAgreementTypeId = new ServiceAgreementType_Id(new CisDivision_Id("FR"),"F0WAM");     
                          saDTO = (ServiceAgreement_DTO) createDTO(ServiceAgreement.class);
                          saDTO.setId(new ServiceAgreement_Id("1234567890"));
                          saDTO.setAccountId(new Account_Id("6487037372"));
                          saDTO.setPremiseId(new Premise_Id("5282464492"));
                          serviceAgreement = saDTO.newEntity();
      System.out.println(" SA Id ="+ serviceAgreement.getId().getIdValue() );