Hello,

This is my entitymodel.xml file

<entity entity-name="Employee" package-name="org.ofbiz.hello1" title="Hello
Person Entity">

      <field name="empId" type="id-ne" ></field>
      <field name="firstName" type="name"></field>
      <field name="lastName" type="name"></field>
      <field name="email" type="name"></field>
      <prim-key field="empId"/>
    </entity>

This is part of EmployeeServices,java

GenericValue employee = delegator.makeValue("Employee");
    employee.put("empId",12);
    employee.put("firstName",firstName);
        employee.put("lastName", lastName);
        employee.put("email", email);


when i am giving hard coded value for empId then its getting stored in DB.
i want to autoassign that field so that i don't have to hard-code the value
again and again ... Any help on this?
Thanks in advance!

Reply via email to