I have two content types: job posting and job application.
The job application content type has a node reference field for job posting. Whenever users create a job posting node, other users can send a job application to that job posting by filling the fields.
How can I send a notification to the user who had posted the job application node when the node has been created?
Sure, with the Rules module create a new rule with this configuration:
admin/rules/trigger/add choose a name for your rule
In the Event dropdown choose After saving new content and click 'Save changes'
Add a condition of: Content has type under the Node heading in the conditions dropdown
Add an action of: Load a referenced node under the CCK dropdown heading and choose the node reference field you want to use (the one in the job app content type) and click 'Save'
Add another action: Load a user account under the User dropdown heading. In the User id field, add
<?php print $referenced_node->uid; ?> and click 'Save'
Add a third action: Send a mail to a user under the System dropdown heading, changed the Recipient dropdown to Loaded user and configure the Sender, Subject, and Body of the email and click save.
Now when a user creates a job application an email will be sent to the user who created the referenced job posting (assuming there is a value in the node reference field, it should be required).
you can try something like this
Entity has field >>>> select your entityreference field
Actions: Fetch entity by id >>>> node:your-reference-field:nid (this should pull data from the node that is referenced via your entity reference field)
Now, if the email field is on your referenced node that should become available when you drill down