Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1390 Weergaven

Hi,

I'm using the Recruitment App and trying to create a new Job Application through an Automation Rule Webhook.

I can create the application when I don't include the "job_id" or "department_id," but it doesn't get associated with a job position.

However, when I add "job_id" or "department_id" to the record creation code, I get a 403 Forbidden error when I call the webhook through Postman, and the job application isn't created.


Code I'm using to create the Application:

vals = {
    'name': payload.get('position'),
    'partner_name': payload.get('first_name') + ' ' + payload.get('last_name'),
    'partner_mobile': payload.get('phone'),
    'email_from': payload.get('email'),
    'job_id': 2,
    'department_id': 1
}

env['hr.applicant'].create(vals)


Any idea what I'm doing wrong?


Thanks!

Avatar
Annuleer
Auteur

Update:
I tried using .sudo(), but I had no luck… Any other solution to try?