cancel
Showing results for 
Search instead for 
Did you mean: 

Update the discount in the sales order matrix

Former Member
0 Kudos

Hi

I am trying to update the discount column in the sales order matrix using -

omatrix.Columns(17).Cells(lc).Specific.String = d1

This works fine but the code after that line is not run because an event is triggered.

Is it possible to update this through any other method pls ?

Regards Andy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Paul,

I have had no such problem. Make sure you don't get an error on this line. Not too sure which programming language you are using, but when I write the following code I get the next message.

Try
  aMatrix.Columns.Item(17).Cells.Item(lc).Specific.String = d1
  oApplication.MessageBox("Here")
Catch ex As Exception
  MessageBox.Show(ex.Message)
End Try

This code was executed by another event and was in the ItemEvent procedure.

Hope it helps,

Adele

Former Member
0 Kudos

Hi Adele

The problem is if you follow the code in debug mode as soon as you update the discount an event is generated and that code is then run, rather than the next line in your subroutine.

If I could update with a datasource, events are not generated.

I hope that makes sense.

Regards Andy

Former Member
0 Kudos

Hi Paul,

Does the value change in the cell change or not?

Thanks,

Adele

Former Member
0 Kudos

Hi Adele

I have sorted it, the cell values changes but when the event code was being ran, I set an object to nothing and I was using the same object code in my sub !

It would be alot faster if I could update with a datasource as all these events are not started.

Thanks for your help

Regards Andy

Former Member
0 Kudos

Hi Andy,

Please close the message as it seems to be solved now.

Thanks,

Adele

Answers (1)

Answers (1)

barend_morkel2
Active Contributor
0 Kudos

This is the only way to insert values into the matrix. It should work fine for you.

Former Member
0 Kudos

Hi Barend

That's the problem it doesn't always work. I thought there was a way you could update with userdatasources instead ?

Regards Andy