You need to sign in to do that
Don't have an account?
Henrique Rodrigues
How to insert records from a thirdy-party software
Hello, i'm developing a web service to receive a list from a third-party software, but when my class receive the list, nothing happens. How can i insert records with this way in salesforce? This is my code, can anyone evaluate to see what is wrong, please?
global class IntegrationWSCustomerItem { global class CustomerItemResponse { webservice String Oracle_Code; webservice Id Salesforce_ID; webservice Boolean Status; webservice String Description; } global class CustomerItemRequest { webservice String Account_Code; webservice String Application_Code; webservice String Code_Product_Customer; webservice String Oracle_Code; webservice String Product_Code; webservice String Subsegment_Code; } webservice static List<CustomerItemResponse> createCustomerItem(List<CustomerItemRequest> customer_entrada){ IntegrationUtils.WSLog('Customer_Item', JSON.serialize(customer_entrada)); List<CustomerItemResponse> Result = new List<CustomerItemResponse>(); List<Customer_Item__c> Customer_Item = new List<Customer_Item__c>(); //List<CustomerItemRequest> cir = new List<CustomerItemRequest>(); for (CustomerItemRequest cir : customer_entrada) { Customer_Item__c ci = new Customer_Item__c(); ci.Account__c = cir.Account_Code; ci.Application__c = cir.Application_Code; ci.Code_Product_Customer__c = cir.Code_Product_Customer; ci.Oracle_Code__c = cir.Oracle_Code; ci.Product__c = cir.Product_Code; ci.Subsegment__c = cir.Subsegment_Code; Customer_Item.add(ci); } return new List<CustomerItemResponse>(); } }
if(!Customer_Item.isEmpty())