How can I add a second submission handler to a form to run after the default handler node_form_submit I need to generate a node of a dependent content type when creating a node of the primary content type.

I have successfully created the function to be called and attached it to the form and it creates the node as desired, but since the function that generates the secondary node runs first, it cannot be populated with the node id of the primary node, nor with any other data elements from the primary node.

How do I ensure that the submit handlers are executed in the proper order?

   $form['#submit'][] = 'nttac_custom_tta_submit';
   $form['actions']['submit']['#submit'][] .= 'nttac_custom_tta_submit';
   $form['actions']['submit']['#submit'][] = array('node_form_submit','nttac_custom_tta_submit');


None of the above methods seem to work although they do get the handlers in the proper order
All the methods you have mentioned should be calling your custom submit handler at the end. However check your $form array when the page is loaded to confirm your custom submit handler is at the right place.

If not try 

MYMODULE_entity_insert($entity, $type) {

//Paste your secondary node creation code here

}


See https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_entity_insert/7 for more details on this hook