When I try to update a field in the sales order which exist in the form, then I am able to update it successfully but the field I am trying to update (createPOSpecified ) is not available in this sales form. Note: createPOSpecified is not displayed in the sales order screen in NetSuite. If ( != true) throw new Exception() īut I get the follwoing Error: You do not have permissions to set a value for element createPOSpecified due to one of the following reasons: 1) The field is read-only 2) An associated feature is disabled 3) The field is available either when a record is created or updated, but not in both cases. Response = Service.update(updateSalesOrder) SalesOrderItemList salesOrderItemList = new SalesOrderItemList() PoItem.internalId = purchaseOrder.internalId SalesOrderItem soItems = new SalesOrderItem UpdateSalesOrder.internalId = “XXXXXXXX” WriteResponse response = Service.add(createPurchaseOrder) Ĭode I'm using to Update Purchase Order Number in Sales Order: var updateSalesOrder = new SalesOrder() PurchaseOrderItemList purchaseOrderItemList = new PurchaseOrderItemList() ĬemList = purchaseOrderItemList Item.type = RecordType.nonInventoryPurchaseItem PurchaseOrderItem Items = new PurchaseOrderItem RecordRef depRecordRef = new RecordRef() ĭepRecordRef.type = partment Ĭpartment = depRecordRef SoRecordRef.type = RecordType.salesOrder ĬreatePurchaseOrder.createdFrom = soRecordRef Purchase Order Creation code: var createPurchaseOrder = new PurchaseOrder() ĬreatePurchaseOrder.entity = new RecordRef() Can you please check and let me know what I’m missing here? But I'm getting error (see at the bottom). I’m trying to automate linking the NetSuite purchase order to a NetSuite sale order and the following is the code I tried to accomplish this task.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |