I am setting up an external web site that talks with Netsuite using SuiteTalk. I am using ASP.NET and C# and Visual Studio, I can't figure out how to get the URLs for the images selected for my inventory items.
SITUATION 1
I have an inventory item record as such:
InventoryItem item = (InventoryItem)response.record;
but if I try to do
str image = item.storeDisplayImage;
or
str image = item.storeDisplayImage.value;
or
str image = item.storeDisplayImage.value.ToString();
I get errors such as "Object reference not set to an instance of an object."
Visual Studio tells me that "value" should be a valid attribute of such an item type, so I don't know why this doesn't work.
SITUATION 2
Most of my images are stored in custom item image fields, and so they are returned in a customFieldList array. Each instance of an image is of a type SelectCustomFieldRef. Again, Visual Studio says that "value" should be a valid attribute of this item type. I can take the object out of the array and convert it explicitly to a SelectCustomFieldRef like so:
SelectCustomFieldRef selCustObj = new SelectCustomFieldRef();
selCustObj = (SelectCustomFieldRef)item.customFieldList[27];
but if I try to get a value from this I get an error like in situation 1.
str thumbnail = selCustObj.value;
gives me the error: Cannot implicitly convert type 'com.netsuite.webservices.ListOrRecordRef' to 'string'
str thumbnail = selCustObj.value.ToString();
returns the result of "com.netsuite.webservices.ListOrRecordRef"
is the value attribute returning some kind of array?