Now if you would like to move the User information to the child request just configure the ChildRequestsV3.json like this
{
"New Hire": [
{
"request": {
"subject": "Create a VPN Account for the employee $udf_fields,$udf_sline_19 - Parent ID : $id",
"requester": "$requester",
"description":"Employee Name: $udf_fields,$udf_sline_19 \n Mobile : $udf_fields,$udf_sline_23 \n Department : $udf_fields,$udf_sline_20 \n Seating Location : $udf_fields,$udf_sline_21 \n Joining Date : $udf_fields,$udf_date_901,$display_value"
}
}
]
}
For example, if you want to populate employee name to the child request subject just add $udf_fields,$udf_sline_19 this will replace with exact value from the parent request when child request is created
For moving the UDF fields from parent request to child request
{
"Default Request": [
{
"request": {
"subject": "Create a VPN Account for the employee $udf_fields,$udf_sline_1201 and parent Id : $id",
"requester": "$requester",
"udf_fields": {
"udf_sline_1201": "$udf_fields,$udf_sline_301",
"udf_sline_301": "$udf_fields,$udf_sline_1201"
}
}
}
]
}
{
"Default Request": [
{
"request": {
"subject": "Create a VPN Account for the employee $udf_fields,$udf_sline_1201 and parent Id : $id",
"requester": "$requester",
"udf_fields": "$udf_fields"
}
}
]
}
Important Note:
1. Make sure that the criteria configured for the parent request in the custom trigger do not match the child requests during creation. If it matches, then it will end up in a loop, where the criteria will match and requests will be created in the loop.
2.Execution Command: py MultipleRequestsV3.py ChildRequestsV3.json $COMPLETE_V3_JSON_FILE