Document RecID
I've just discovered that
does not set the RecID, it only gets set when you add it to the inventory documents collection, is this by design or a bug or am I missing something?
To clarify change the order of lines 2 and three below and the RecID doesn't end up in the custom field, ReadDocument is an extension method.
- Code: Select all
JiwaFinancials.Jiwa.JiwaApplication.Documents.Document doc = Inventory.Manager.CollectionItemFactory.CreateCollectionItem<JiwaFinancials.Jiwa.JiwaApplication.Documents.Document>();
does not set the RecID, it only gets set when you add it to the inventory documents collection, is this by design or a bug or am I missing something?
To clarify change the order of lines 2 and three below and the RecID doesn't end up in the custom field, ReadDocument is an extension method.
- Code: Select all
JiwaFinancials.Jiwa.JiwaApplication.Documents.Document ReadDocument = Inventory.ReadDocument(docText);
Inventory.Documents.Add(ReadDocument);
Inventory.CustomFieldValues.get_ItemFromSettingName("WCDoc" + DocNo.ToString() + "Doc").Contents = ReadDocument.RecID;