Can we create multiple clild records on basis of date range?

  • 1
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Hi Team,

We have an application where we create blank time cards for associates in which they fill their hours per day for one year through import function.

Can we do something that if we provide a start date and end date (Date range) then, with the help of button we can create the time cards?

We want to trigger this button from the parent record.

Please let me know if you require any additional information.

Thanks,
Gaurav
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
  • Happy

Posted 2 years ago

  • 1
  • 1
This is definitely doable with a button that calls a fairly simple script on a code page hosted in your application. 

Just to clarify, you will create a parent record and enter a start date and an end date, then click a button and it creates a child record for each day within that span? Including weekends?

Let me know if we are on the same page.
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,710 Points 5k badge 2x thumb
Yup, we are on the same page.

Can you please explore about the script?

Thanks in advance :)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
Hi Dan,

I tried this and successfully implement the same.. Love your skills.

There is a question when I create child records so, why it does not include the base date?

Regards,

Gaurav
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
Hi Dan,

I am facing a problem actually the parent table is a sync table. After changing the Record ID# to Record ID#2 it is still not redirecting back.

Thanks,
Gaurav
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
I don't understand your question. Ask in a new thread and supply sufficient details.
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
Hi Dan,

I read it and it is very useful. I'll try to implement this and will get back to you if I miss something.

Thanks for your help.

Regards,
Gaurav