Hello All-
Been searching high and low for a solution here...this is the situation.
Writing a C# app to fulfill and bill a sales order. These sales orders are "cash sale" type. Am able to fulfill using the initialize method against the original SO. Successfully assigning lot numbers to each line item and committing the item fulfillment record.
Using the initialize method for the cash sale and am getting the following error:
Code=INSUFFICIENT_PERMISSION You do not have permissions to set a value for element createdfrom 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.
I'm using the ignoreReadOnlyFields preference. The WS account role is set to "Full Access" to ensure all permissions...can't really set createdFrom to null as it's the ID of the original SO.Here is the code for info: public void generateCashSale(SalesOrder so) { // setup the prefs Preferences prefs = new Preferences(); _Service.preferences = prefs; prefs.ignoreReadOnlyFields = true; prefs.ignoreReadOnlyFieldsSpecified = true; // init the cash sale InitializeRef irSo = new InitializeRef(); irSo.internalId = so.internalId; irSo.type = InitializeRefType.salesOrder; irSo.typeSpecified = true; InitializeRecord irecSo = new InitializeRecord(); irecSo.type = InitializeType.cashSale; irecSo.reference = irSo; ReadResponse resIr = _Service.initialize(irecSo); if (resIr.status.isSuccess) { // Note: we may need to manage the ccApproved member here - as noted by NS CashSale cs = (CashSale)resIr.record; cs.chargeIt = true; cs.chargeItSpecified = true; WriteResponse res = _Service.add(cs); if (res.status.isSuccess) { _Out.writeLn("cash sale created " + so.tranId); updateSalesOrderExportStatus(so, "4"); } else { _Out.error("cash sale failed " + so.tranId + " - " + getStatusDetails(res.status)); updateSalesOrderExportStatus(so, "5"); } } else { _Out.error("initialize cash sale failed " + so.tranId + " - " + getStatusDetails(resIr.status)); updateSalesOrderExportStatus(so, "5"); } } Any help would be greatly appreciated...I know you guys are doing this out there in the SuiteFlex world :-)Thanks,Scott