Reputation: 173
I'm working on an application that creates and save invoices on salesforce cloud but when i try to create a transaction i get the following error
"SObject row was retrieved via SOQL without querying the requested field: s2cor__Sage_INV_Trade_Document_Type__c.s2cor__Use_Company_Shipping__c"
below is my code for creating the transaction
SuccessResponse createTransResponse = await client.CreateAsync("s2cor__Sage_INV_Trade_Document__c", transaction);
the Transaction class is created like so
public class Transaction
{
public String Name { get; set; }
public String Id { get; set; }
public string s2cor__Reference__c { get; set; }
public String s2cor__Account__c { get; set; }
public String s2cor__Date__c { get; set; }
public string s2cor__Trade_Document_Type__c = "a211v0000022YBpAAM"; // use this
//public string s2cor__Net_Amount__c { get; set; }
public string s2cor__Currency__c { get; set; }
public string s2cor__Exchange_Rate__c { get; set; }
}
Upvotes: 0
Views: 1426
Reputation: 111
Check for triggers defined on the "s2cor__Sage_INV_Trade_Document__c" SObject in Salesforce. Looks like an error in a trigger to me.
Upvotes: 0