Create an external entry form or online case form ...
# ask-stanley-ai
s
Create an external entry form or online case form which captures the customer id through a url parameter and doesn't require title or name field.s
c
AI generated answer (using internal Slack threads):
To create an external entry form or online case form that captures the customer id through a URL parameter and doesn't require title or name field, you can follow these steps: 1. Navigate to Setup > Support > Online Case Forms in NetSuite. 2. Create a new form or edit an existing one. 3. In the form, you can remove the requirement for the title or name field. 4. To capture the customer id through a URL parameter, you can use a client script attached to the form. This script will parse the URL parameters and fill in the appropriate fields. Here is a sample of how you can do this:
Copy code
javascript
function pageInit(type){
    var customerId = getParameterFromURL('custid');
    if(customerId){
        nlapiSetFieldValue('custid', customerId);
    }
}

function getParameterFromURL(param){
    var regex = new RegExp('[?&]' + param + '(=([^&#]*)|&|#|$)'),
    results = regex.exec(window.location.href);
    if (!results) return null;
    if (!results[2]) return '';
    return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
In this script, the
getParameterFromURL
function gets the value of the 'custid' parameter from the URL. The
pageInit
function sets the value of the 'custid' field in the form to the value obtained from the URL. Please note that you need to replace 'custid' with the actual id of the customer field in your form. ****** 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.839871526
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838533223
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836765409
Please provide your feedback on this answer.