Created
October 19, 2021 07:42
-
-
Save axilaris/70a24cd73b76f3d6b6bbd0f8681518eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @NApiVersion 2.1 | |
| * @NScriptType Restlet | |
| */ | |
| define([ | |
| "N/log", | |
| "N/search", | |
| ], function (log, search) { | |
| function post(context) { | |
| log.debug('POST1 Context', context); | |
| return JSON.stringify(getCustomRecords(context)); | |
| } | |
| function getCustomRecords(context) { | |
| var mycustomSearch = search.create({ | |
| type: search.Type.CUSTOM_RECORD + '1589', | |
| title: 'Search Title', | |
| id: 'customsearch_my_second_so_search', | |
| columns: [{ | |
| name: 'id' | |
| }, { | |
| name: 'custrecord3987' | |
| }], | |
| filters: [{ | |
| name: 'custrecord3987', | |
| operator: search.Operator.EQUALTO, | |
| values: [context.custrecord3987] | |
| }], | |
| }); | |
| return mycustomSearch; | |
| } | |
| return { | |
| post: post, | |
| }; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| payload = { | |
| "custrecord3987": "12345678", | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!