```function main(request, response) { nlapiLog...
# suitescript
j
Copy code
function main(request, response)
{
    nlapiLogExecution('DEBUG','Getting Reques Parameters');

    var s3Id = request.getParameter('custscript_param_s3_record_id');
    var item = request.getParameter('custscript_param_line_item');

    nlapiLogExecution('DEBUG','Loading Amazon S3 Record');
    var s3Record = nlapiLoadRecord('customrecord_sc_s3_files', s3Id);
    nlapiLogExecution('DEBUG','S3 Record Id', s3Id);

    //Block Quick Proof Email Checkbox
    nlapiLogExecution('Debug','Blocking Quickproof Email' );
    s3Record.setFieldValue('custrecord_blockquickproofemail', 'T');

    //Set File Uploaded by Customer Field
    nlapiLogExecution('DEBUG','Loading Item Record');

    var itemRecord = nlapiLoadRecord('assemblyitem', item);
    nlapiLogExecution('DEBUG','Line Item', item);

    nlapiLogExecution('DEBUG','Setting File Uploaded By Customer Field');
    var fileUploadedByCustomer = itemRecord.getFieldValue('custitem_s3_pd_graphic_link');
    s3Record.setFieldValue('custrecord_fileuploadedbycustomer', fileUploadedByCustomer);
    nlapiLogExecution('DEBUG','File Uploaded By Customer', fileUploadedByCustomer);

    nlapiSubmitRecord(s3Record);
}