Hi, I'm trying to use the REST services to create ...
# suitetalkapi
j
Hi, I'm trying to use the REST services to create a vendorbill, though it seems I'm unable to set the items department / class. If I use an item which has the department / class set via the item record, the vendor bill will be created. If I clear the item department / class I receive the following:
{
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",     "title": "Bad Request",     "status": 400,     "o:errorDetails": [         {             "detail": "Error while accessing a resource. Please enter value(s) for: department, class.",             "o:errorPath": "item.items[0]",             "o:errorCode": "USER_ERROR"         }     ] }
payload below:
{
    
"subsidiary": "22",
    
"memo": "test",
    
"externalId" : "123abc",
    
"entity": "1330",
    
"department" : "1",
    
"class" : "2",
     
"item": {
        
"items": [{
            
"description": "test",
            
"quantity": 1,
            
"rate": 1,
            
"amount" : 1,
            
"item" : "1721",
            
"department" : "1",
            
"class" : "2"
        
}
        
]
    
}
}
c
Looks like its required on the default form
if you don't want it, make it not required on the form the vendorbill i using
or when saving the vendorbill, set the ignoreMandatoryFields flag to true
j
my challenge is that I'm not able to set it via the payload - i'm trying to pass the 'department' and 'class' through the items sublist though it doesn't seem to pick them up.
I opened a case with Nestuie support - they have confirmed it a defect and attached it to defect 602560