You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the MS sample code to create a journal using OData.
I can create the header fine.
However, when the header is created, the journal number is returned in the response.
How do I get the journal number from the response?
The record is created using
resp = context.SaveChanges();
resp is of type DataServiceResponse, and contains the data in Json format (if I understand this correctly) - but I'm having trouble pulling gout the one field with the new journal ID.
How do I get the new journal ID from the response?
The text was updated successfully, but these errors were encountered:
DataServiceResponse response = context.SaveChanges(SaveChangesOptions.PostOnlySetProperties);
foreach (ChangeOperationResponse change in response)
{
EntityDescriptor descriptor = change.Descriptor as EntityDescriptor;
if (descriptor != null)
{
var ret_entity = descriptor.Entity as NameOfYourEntity;
..do whatever you need to do with ret_entity should have all of the props available and populated for you from your newly inserted record
}
}
I'm using the MS sample code to create a journal using OData.
I can create the header fine.
However, when the header is created, the journal number is returned in the response.
How do I get the journal number from the response?
The record is created using
resp = context.SaveChanges();
resp is of type DataServiceResponse, and contains the data in Json format (if I understand this correctly) - but I'm having trouble pulling gout the one field with the new journal ID.
How do I get the new journal ID from the response?
The text was updated successfully, but these errors were encountered: