I have created AIF document service for creating Inventory Movement through visual studio. When tried to create Journal Lines, application throughs an error "Number sequence 0 does not exist". Here is my code to create Journal lines: -
DataTable dtModulaMovement = MovementData(DateTime.Parse( date));
JournalMovementServices.CallContext context = new JournalMovementServices.CallContext();
context.Company = "ABCD";
context.MessageId = Guid.NewGuid().ToString();
List<AxdEntity_InventJournalTrans1> transactions = new List<AxdEntity_InventJournalTrans1>();
decimal line=0;
AxdEntity_InventDim inventDim = new AxdEntity_InventDim()
{
WMSLocationId = "Default",
InventSiteId = "Jeddah"
};
foreach (DataRow row in dtModulaMovement.Rows)
{
line++;
AxdEntity_InventJournalTrans1 trans = new AxdEntity_InventJournalTrans1()
{
JournalId = journalId,
ItemId = row["MOV_ARTICOLO"].ToString(),
TransDate = DateTime.Parse(row["MOV_TIME1"].ToString()),
LineNum = line,
LineNumSpecified = true,
InventDimId="ABCD-602295"
};
transactions.Add(trans);
}
AxdJournalLines lines = new AxdJournalLines();
lines.InventJournalTrans = transactions.ToArray();
JournalMovementServices.JournalLinesServiceClient linesClient = new JournalLinesServiceClient();
var keys = linesClient.create(context, lines);
*This post is locked for comments
I have the same question (0)