Jules Croizier Posted October 11, 2023 Posted October 11, 2023 Hello everyone, I want to use some javascript in my L4G code . In the first place, I'm following this tuto as an introduction : https://online-help.sageerpx3.com/erp/12/wp-static-content/static-pages/en_US/v7dev/integration-guide_4gl-crypto-bundle.html I've following all instructions but when i want to execute the L4G code, it doesn't work . This is the result i got in the RESHEADER : I don't understand why he can't find my module Thank ! PS : Yes I've restart Sage Syracuse NODE0
Rui Martins de Almeida Posted October 12, 2023 Posted October 12, 2023 SAGE X3 Version and components please.
Jules Croizier Posted October 12, 2023 Author Posted October 12, 2023 Oh sorry i've forgot to specify : I using Sage X3 V12 and what are components in Sage X3 ? Thank !
Rui Martins de Almeida Posted October 12, 2023 Posted October 12, 2023 Syracuse, patch level, node version. 1
Jules Croizier Posted October 12, 2023 Author Posted October 12, 2023 Syracuse product version : 1.0.15.0 Node version : 14.19.3 X3 Release: 2022 R4(12.0.32) version : 90.32.67
Manish JOGEEAH Posted March 28 Posted March 28 Hello Jules, Did you find the solution for this issue? Thanks.
Ben Turner Posted April 30 Posted April 30 On 3/28/2024 at 1:55 AM, Manish JOGEEAH said: Hello Jules, Did you find the solution for this issue? Thanks. I would almost guarantee this particular 404 has to do with misplacement of the module extension within the file structure or a naming typo, HOWEVER, please be advised that Sage's example, which is quite dated, currently contains malformed / deprecated javascript which will not compile (response 500). The function code is not correctly structured within the crypo-helper.js file. Sage Example Code: exports.digest(text) { var hash = crypto.createHash('sha1'); hash.update(text, 'utf8'); return hash.digest('hex'); } Corrected Example Code: exports.digest = function(text) { var hash = crypto.createHash('sha1'); hash.update(text, 'utf8'); return hash.digest('hex'); } Make this change, restart your node. Now the header should look like this and the function should be callable within 4GL. hope this helps.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now