Project Intercompany Cross Charge Request

The Project Intercompany Cross Charge Request record provides the ability to cross-charge amounts between subsidiaries with the integration period-end process. It enables you to set amounts in a currency that you can use for intercompany cross-charges reflected in the Intercompany Cross Charges list, and to request approvals around the record.

To use the Project Intercompany Cross Charge Request record you must enable the Project Management and Intercompany Framework features.

For help working with this record in the UI, see the help topics Intercompany Framework, Intercompany Cross Charges and Using Project Management.

The internal ID for this record is projecticchargerequest.

See the SuiteScript Records Browser for all internal IDs associated with this record. For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser.

For information about scripting with this record in SuiteScript, see the following help topics:

Supported Script Types

The Project Intercompany Cross Charge Request record is scriptable in server and client SuiteScript.

Supported Functions

This record is fully scriptable, which means that the record can be created, updated, copied, deleted, and searched using SuiteScript.

Code Samples

The following sample shows how to create a record and how to set up the fields needed. It selects Project Completion as the trigger and adds the amount of 200. The IDs are the values for the currency.

          /**

 * @NApiVersion 2.x

 * @NScriptType UserEventScript

 */



define([ 'N/record' ],function(record) {

    function afterSubmit(context){

        // Create the record.

        var rec = record.create({

            type: 'projecticchargerequest',

            isDynamic: true

        });



        // Set body fields on the record.

        rec.setValue({

            fieldId: 'fromsubsidiary',

            value: '1'

        });

        rec.setValue({

            fieldId: 'tosubsidiary',

            value: '3'

        });

        rec.setValue({

            fieldId: 'project',

            value: '339'

        });

        rec.setValue({

            fieldId: 'amount',

            value: '200'

        });

        rec.setValue({

            fieldId: 'currency',

            value: '1'

        });

        rec.setValue({

            fieldId: 'chargetrigger',

            value: 'ProjectCompletion'

        });



        // Save the record.

        try {

            var recId = rec.save();

            log.debug({

                title: 'Record created successfully',

                details: 'Id: ' + recId

            });

        } catch (e) {

            log.error({

                title: e.name,

                details: e.message

            });

        }

    }

    return {

        afterSubmit: afterSubmit

    };

}); 

        

Related Topics

General Notices