Help with Button that inputs Date into parent record
Chronos is a subtable of Leads. When creating a Chrono, I have made an option that allows a user to push the button to create an "Active Date" that matches with the Date of the Record in the chrono and puts it into the correct field in the Parent Table. I am trying to find a way that it only puts that into the connecting records and not all records in the parent table. Here is the following code that executes...but this code puts the date into ALL records in the parent table.
alert("This will set this Lead's first Activity Day as the Date of this Chrono. Please click 'OK' to confirm");
let xDate := date('Date + Time');
(select Leads).('Active Date' = xDate)
3 replies
-
Your third line says to get all records in Leads (select Leads) and change the 'Active Date' of all records that was selected to equal the xDate.
You said Chronos is a subtable of Leads, so there is a reference field called Leads. If you only want to change the 'Activity Date' of the parent record in Leads you can just use Leads.
alert("This will set this Lead's first Activity Day as the Date of this Chrono. Please click 'OK' to confirm"); let xDate := date('Date + Time'); Leads.'Active Date' = xDate
It is interesting that you don't allow the user to cancel the changing of the field. Maybe it should be a dialog field instead? Otherwise, why even have the alert.
Content aside
- 8 mths agoLast active
- 3Replies
- 36Views
-
2
Following