cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Matrix column title?

Former Member
0 Kudos

Hi all,

Is it possible to change a matrix column title using the ColumnTitle.Caption property? I have tried using the following code but it does not work:

'Sales order form - Add mode.

If pVal.FormType = 139 And pVal.FormMode = 3 Then

'After form loads

If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False Then

'SO form.

Set oForm = oApp.Forms.Item(FormUID)

Set oItem = oForm.Items.Item("38")

Set oMatrix = oItem.Specific

Set oColumn = oMatrix.Columns.Item("1")

oColumn.TitleObject.Caption = "Item Code"

End If

End If

Thank you.

Andrew.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can use the caption property to change the column title, and the code looks ok to me.

Are you using event filters, or do you have other checks that might be preventing the code reaching this point? When running through the debugger does the line that sets the caption get executed, if so what happens?

John.

Former Member
0 Kudos

Hi John,

Thanks for the reply. Your questions/suggestions led me on a path to finding the problem and a solution.

I tried the same block of code in another company db and it changed the column title fine. The reason it wouldn't work in the current company db I'm working on was because I had previously changed the column title to 'Item No.' (using ctrl & double-click). So the SDK was changing the Original Description but the new desc. of 'Item No.' remained unchanged. As soon as I deleted the new desc. the SDK worked fine.

Thanks for your help.

Regards,

Andrew.

Answers (0)