Amend fields with Read Only status

SOLVED

Hi all, 

for some reason, I want to update specific fields but these fields have read only status. Any other way to update it programatically?

  

the fields is DocumentValue, UnitBuyingPrice, LineTotalValue in Sage.Accounting.POP.POPInvCredItem

this is the message that is prompted.

Parents Reply
  • +1 in reply to murni
    verified answer

    By the time you've got tto the form shown above you're working with a PurchaseInvoiceInstrument, not a POPinvCredItem.

    Have a look at the example in the SDK:

    https://my.sage.co.uk/Sage200SDKDocs/html/DOC0043_Example.html#BOOKMARK

    You'll probably want to consider setting the NewDiscountedUnitPrice property of each POPInvCredItem if that needs changing (and do set it through the property, not throught the fields collection like in you example, that bypasses the business logic and you don't want to do that).  Then look at where the example is getting hold of the PurchaseInvoiceInstrument instance; once you've got hold of this then you can make the necessary changes to the values/nominal analysis etc. 

Children