Discussions
Sales Order Item Options
Hello,
I'm creating a sales order with an item and a client attached to it using Java.
I would like to set the Options field where i have 3 custom fields, but i can't access these fields, i'm getting an error : "The specified custom field reference custcoldomain1 is invalid."
Here is my code :
...
//Get the the item
item = new RecordRef();
item.setType(RecordType.inventoryItem);
item.setInternalId(PRODUCT);
salesItem = new SalesOrderItem();
salesItem.setItem(item);
//Set quantity and price
salesItem.setQuantity(QUANTITY);
salesItem.setAmount(PRICE);
//Set the Options
StringCustomFieldRef custcoldomain1 = new StringCustomFieldRef();
custcoldomain1.setInternalId("custcoldomain1");
custcoldomain1.setValue("www.somevalue.com");
BooleanCustomFieldRef custcoldomaintemp1 = new BooleanCustomFieldRef(true,"custcoldomaintemp1");