Multiple events at one time

HI,

i'm devloping an application to store and track all the devices in the comapny, and users needs to update device details like current assignee, status, location and device condition, My question is what if one of the users wants to update the asignee and location or device condition at one time how can i capture the event ID in this case? i need to store in the logs that assignee has been updated and location has been changed, what is the best solution here? 

  Discussion posts and replies are publicly visible

Parents Reply Children
  • +1
    Certified Senior Developer
    in reply to Ayman95

    Have a initial query for your record in a local variable with refresh as always false, which will not have anything to do with the rule input of the record. Now when you make changes to any value only your rule input would change. Now in the submit button you need to add a save with your Event record rule input and write a foreach to save this.

    a!save(
      ri!eventHistory,
      a!foreach(
        items: ri!record,
        expression: if(
          exact(ri!record.feild1, local!record.field1),
          {},
          recordType!eventHistory(field1: {}, feild2: {})
        )
      )
    )