Hello Mudassir Afreen,
Thank you for replying. I appreciate you working with me on this.
I did replace OBJECT NAME with the name of the object I am referencing, and changed the fields subject, priority, and closed date with the fields I want to use. The object I am using is not a case object and therefore does not have the fields close date, subject or priority.
Maybe I explained what I want incorrectly:
When a new person record is added (person object), a field is created called household id. Any person with the same address shares this household id. When one of these persons needs equipment, a request is created (request is the case object). When the request is closed, the equipment (inventory object) is assigned (the way it is assigned is the household id is added the inventory record, the field is called client household id) to the person. I would like this piece of equipment to be assigned to all persons with the same household id.
All 3 objects contain lookups to each object.
Thank you for taking time to help me with this.
Added the code I am using:
public class CopyRecord
public void copyRecord(Parameters params) throws Exception
String modelname = (String)params.get(“model_name”);
String serialnumber = (String)params.get(“serial_number”);
String installdate = (String)params.get(“install_date”);
String customid = (String)params.get(“client_household_id”);
String sql1="SELECT * from Inventory_Item where household_record= "+customid ;
Parameters param = it.next();
Parameters pm = Functions.getParametersInstance();
pm.add(“model_name”, modelname );
pm.add(“serial_number”, serialnumber );
pm.add(“install_date”, installdate );
Result result = Functions.updateRecord(“Inventory_Item”,recordid,pm);
catch (Exception e)