i dont want to generate pdf from suitelet let just...
# ask-stanley-ai
w
i dont want to generate pdf from suitelet let just get the data that i need
c
AI generated answer (using internal Slack threads):
If you want to get the data from a Suitelet without generating a PDF, you can use the
N/currentRecord
module. This module provides a way to access the data in the current record. You can use it in combination with
Form.clientScriptModulePath
to access the data from the client side. Here is a sample code snippet:
Copy code
javascript
define(['N/currentRecord'], function(currentRecord) {
    function getDataFromRecord() {
        var record = currentRecord.get();
        var fieldValue = record.getValue({
            fieldId: 'your_field_id'
        });
        return fieldValue;
    }
    return {
        getDataFromRecord: getDataFromRecord
    };
});
In this code,
your_field_id
should be replaced with the actual field id from which you want to get the data. If you want to access the data from the form post in the Suitelet, you can use the
https.ServerRequest
object. This object contains all the data that was sent in the HTTP request. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839659333
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837223
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834320545
Please provide your feedback on this answer.