Hi,
I'm trying to implement transaction in MDS through service. I'm inserting a member through EntityMembersCreate().
If there is any error while inserting, i need to revert this member entry from MDS [Like ROLLBACK transaction in TSQL].
Here is the code: // Create a new entity member
OperationResult operationResult = new OperationResult();
Collection<MemberIdentifier> InsertedMembers = new Collection<MemberIdentifier>();
InsertedMembers = mdsProxy.EntityMembersCreate(international, entityMembers, true, out operationResult);
// Reverse Transaction
int iTransID = InsertedMembers[0].InternalId;//NOT GETTING TRANSACTION ID FROM MemberIdentifier
Collection<ReplacementId> Replacement = new Collection<ReplacementId>();
mdsProxy.TransactionsReverse(international, new Collection<int> { iTransID }, out Replacement);
1) I couldn't able to get the transaction ID in from the EntityMembersCreate.
2) I found when there is an error in any attribute in member, then all other attributes are getting inserted expect that. Partial member is inserted even if one attribute is error out.Ideally I was expecting ALL OR NOTHING.
Please advice on the above 2 queries.
Thanks in Advance!
- ANAND