I am building a Scheduled Script that takes a Phone Call record saved search, creates a CSV with Order Number and Phone Number. It then uses a calling service's API to upload and schedule the calls. I am using Suitescript 1.0
I also have a custom record called Call Attempt that has a field linked to the parent record. This creates a "New Call Attempt" button on the Phone Call form, that I moved on to the "Messages" tab . I want to create & save the New Call Attempt from the scheduled script. I successfully update the "Phone Call" record but I can't get the new Child Record created. Using nlapiCreateRecord() errors because I am missing the id parameter. The child record is linked to the phone call with the "custrecord_callattempt_phonecall" field that contains the Phone Call Record Id.
The UI form is opened from this link - https://xxxxxxx.app.netsuite.com/app/common/custom/custrecordentry.nl?rectype=69&pf=CUSTRECORD_CALLATTEMPT_PHONECALL&pi=1411539&pr=-22 where pi is the Phone Call record id.
I have tried phonecallrecord.createSubrecord('custrecord_callattempt_phonecall'); That didn't work I received this error "Field custrecord_callattempt_phonecall is not a subrecord field."
I'm stuck , I can automate the phone calls, but I need to keep the CallAttempt records sync'd with the Phonecall Record. It's a chore to manually create each call attempt record from the "New Call Attempt" ,buttom especially now that our outbound call volume is increasing.
Any help would be appreciated (I can also rewrite this in SS 2.0 is necessary).