auto filled data from previous record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 02:26 AM
Hi everyone,
In my scenario, a new record is automatically created in the system every six months for each user. I want the newly created record to be pre-populated with the data that the same user submitted in their previous record.
What would be the best way to implement this functionality?
Thank you
Beyza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 03:28 AM
Hi @beycos ,
Create a Scheduled Job:
- In navigation menu, type "Scheduled Jobs" in the search bar and select "Scheduled Jobs." Click on "New" to create a new Scheduled Job record.
Configure the Scheduled Job:- Provide a name and description for the Scheduled Job.
- In the "Run" field, select "Recurring."
- Choose the appropriate interval. In your case, you want the job to run twice a year, so select "Months" and set the interval to "6."
-
Select the Script or Business Logic:
- In the "Script" section, provide the script or business logic that you want the Scheduled Job to execute on the specified dates.
var grIn= new GlideRecord('Custom table'); grIn.initialize(); grIn.fieldname1="Data"; grIn.fieldname2secondtable="Data2"; grIn.insert();
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 03:51 AM
Thank you Anand for your quick response.
When a new record is created in the X table, new records are automatically generated in the Y table. I want these new records in the Y table to be auto-filled with data from the same user's previous record. The system already creates new records, but I need them to be auto-filled with the previous data.
Thank you
Regards
Beyza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 03:55 AM - edited 12-03-2024 03:56 AM
Hi @beycos ,
You can create a before insert BR on the table that should solve the purpose.
If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 04:52 AM
Hello Animesh ,
Thank you your quick response as well. I would really appreciate it could you please check the script??