Skip to Content
author's profile photo Former Member
Former Member

Update matrix system form

Dear SAP experts,

I am trying to edit the matrix of a system form (Sales Order) through a bespoke Add-On.

I successfully managed to add and delete items, but for some reason, the totals are not recalculated. They still show the original totals before the update. I'd rather leave this to the system instead of doing it myself.

I tried to execute the Matrix's method 'FlushToDataSource()' but no luck (it gives me an error 'The item is not a user defined item 66000-8').

I also tried (naïvely) to refresh the form itself.

How can I achieve this and also to commit the changes to the database?

Using SAP B1 8.81 / C#

Regards.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2015 at 01:31 PM

    Please post the method/procedure code in which you are trying to accomplish this. From what I've seen, usually when you get an error like that, it means that you're trying to reference a column/row by using a hard coded index value that's different from the column/row that you actually want to update. I do that all the time, and have started to use the IndexOf function instead of hard coding indices to avoid the issue.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 21, 2015 at 08:17 AM

    try with

    oMatrix.Clear()

    oColumn.DataBind.UnBind()

    oColumn.DataBind('DATASOURCE','DATASOURCE-ALIAS')

    oMATRIX.LoadFromDataSource()

    regards

    Helene

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Helene,

      Many thanks for your answer.

      The solution you propose seems to load from the data source to the form matrix, but I'd like to achieve exactly the oposite: the changes made in the matrix to trigger an update in the form and to commit the changes to the database.

      Best regards.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.