[Order Entry - Misc Item - .NET] Misc Item Extended Amount is always set at zero...

SOLVED

Hello there!

I need to add new Orders Entry through code. Everything is working fine, but now I need to add some Misc Item to new Orders Entry. I can successfully create new Orders, but my Misc Item Extended Cost(EXTINVMISC) is always set at zero. I need to be able put my own amount.

If I try to write it directly like this: 

OEORD1detail.Fields.Item("EXTINVMISC").Set_Value(customAmount);

I receive a Read-Only error, which is normal, because an Item's extended amount cannot be set manually, but for a Misc Item, this is the only field available to write the amount. If I try to do directly in Sage 300 ERP and create a Order Entry, I can change the Extended Amount of a Misc item without any problem. 

I don't know what I am missing with the AccpacView? Is there any documentation about inserting Misc Item through the SDK? 

Parents
  • 0
    You made a simple mistake, check your code. Or do another recording and compare.
  • 0 in reply to Jay Converse Acumen
    Simple mistake? what is it? Okay, I made a mistake while writing my post. "Set_Value" should be "set_value". ^^'

    The real line looks like this: OEORD1detail1.Fields.Item(col.ColumnName).set_Value(row[col.ColumnName]);

    Am I writing the data in the right column? At first I was using the same column for Regular Item Entry, but sadly, wasn't effective at all for my Misc Item.

    LINETYPE is set to 2, the item code(MISCCHARGE) is also set. I left the regular item code(ITEM) blank and quantity empty.

    I tried multiple possibilitys, but all was in vain.
Reply
  • 0 in reply to Jay Converse Acumen
    Simple mistake? what is it? Okay, I made a mistake while writing my post. "Set_Value" should be "set_value". ^^'

    The real line looks like this: OEORD1detail1.Fields.Item(col.ColumnName).set_Value(row[col.ColumnName]);

    Am I writing the data in the right column? At first I was using the same column for Regular Item Entry, but sadly, wasn't effective at all for my Misc Item.

    LINETYPE is set to 2, the item code(MISCCHARGE) is also set. I left the regular item code(ITEM) blank and quantity empty.

    I tried multiple possibilitys, but all was in vain.
Children