Now, when users use the Live Tracker or Manual Entry component for tracking time, they will see the additional fields with the default value set for each specific user. Users also have the ability to change the values in the additional fields. By setting up these default values, users do not need to enter details in the additional fields every time when they track time, making the process more efficient.
To set up additional fields and default values in Lightning components in Salesforce, follow these steps:
Create Fields in TT Details Object:
- Click the Setup button in Salesforce and navigate to the TT Details object.
- Click on "Fields & Relationships" and click the New button to create the fields you want to set as additional fields in the Lightning components.
- Follow the prompts to define the field type, label, and any other necessary details.
Create the Same Fields in TT Users Object:
- Go to the TT Users objects and click the New button,
- Create the fields with the same same field name that you created in TT Details object. Copy the field API name for the field from TT Details object and paste it.
- Save the fields,
Note: Copy pasting the field API names from TT Details to TT User fields is mandatory.
By following these steps, you ensure consistency between the TT Details and TT Users objects, allowing you to set up default values and additional fields in your Lightning components efficiently.
Setting Default Values
Go to the TT Users Page add the additional fields to the user page layout.
For each user, set the default value in the newly added fields. Save the changes for each user.
Adding Fields to the Manual Entry and Live Tracker components
- Go to the TT Apps tab in Salesforce, and click on the name of the app you want to configure.
- Click the "Config" button and go to the "Check-in" tab.
- Click on the "Additional Fields" sub-tab and add the fields you previously created to the list.
- Enable the checkbox next to each field if you want to make it a mandatory field.
- Save the changes.
Now, when users use the Live Tracker or Manual Entry component for tracking time, they will see the additional fields with the default value set for each specific user. If required, the Users can change the values in the additional fields.
Adding Additional Fields to Auto Tracking for Console App
To add the additional fields to the auto-tracking feature for the console app, please follow the detailed instructions provided here.
Note: If the fields exists already in the TT Details object, copy the API name and create the fields only in the TT Users object and setup the values to it.