To hide the Customer input parameter on a quote line item, you cannot use the function api.customer("attr name"). Instead, you must use api.customer("attr name", "customer id"), with the customer id specified. If the customer id is left empty, the system will prompt for it.
Example
Groovy
def customerId = api.input("Customer")
if (customerId) {
return api.customer("SALESORG",customerId)
} else {
return
}
The api.input() does not trigger the input box creation.
The method api.customer() has been deprecated in version 14.0; however, it will remain available to ensure backward compatibility. We strongly recommend starting to adopt the queryApi() with the QapiCustomer for new implementations. Note that while the deprecated method does not entail the removal of functionality, it will no longer be maintained. For more information see the example queryApi() implementation.