Extending France Electronic Invoicing Functionality
If you need to extend the existing France Electronic Invoicing functionality in NetSuite, you can do so by creating a custom plug-in implementation and leveraging the France localization extension service.
Overview
The France Electronic Invoicing solution includes an extension service that enables you to reuse standard localization logic and apply custom modifications to E-document content.
Using the France Extension Service
To extend the standard functionality, you must import the France extension service using the exact path below:
/SuiteApps/com.netsuite.euelectronicinvoicing/src/countries/FR/services/FRDocExtensionService.js
This path is fixed and cannot be changed.
After importing the service, call the .extend(context) method to retrieve content processed by the France localization. You can modify the content as needed and return it in the content field of the response object.
Example Implementation:
* @NApiVersion 2.0
* @NScriptType plugintypeimpl
*/
define([
"/SuiteApps/com.netsuite.euelectronicinvoicing/src/countries/FR/services/FRDocExtensionService.js"
], function (FRDocExtensionService) {
function extend(context) {
// Import France Localization functionality
let extendedContent = FRDocExtensionService.extend(context);
// Run your own code / functionality here
extendedContent = /* ... */ extendedContent;
return {
success: true,
// Ensure that you return the extended content
content: extendedContent
};
}
return {
extend: extend
};
});