Using API to edit job items

Using API to edit job items

AccuductAdmin
Contributor Contributor
323 Views
0 Replies
Message 1 of 1

Using API to edit job items

AccuductAdmin
Contributor
Contributor

I am trying to remove a dimension column from an item which is a product list by using the API.  I am able to remove the weight property column with the same api script, but not the diameter dimension column. It is asking for  argument for parameter 'definition'.   Here is what I have so far any help would be appreciated.

 

Code: [Select]

Public Sub Execute() Implements IExternalApplication.Execute

        Dim lstStraight As List(Of Item) = Job.Items.Where(Function(x) x.CID = 40).ToList()

        For Each itm As Item In lstStraight
            Dim dimName As ItemDimensionBase = itm.Dimensions.FirstOrDefault(Function(x) x.Name = "Length")

            If dimName.Value < 9 Then

                itm.ProductList.Template.RemoveDimensionDefinition(*****some parameter needed here*****)

            End If
        Next
    End Sub


0 Likes
324 Views
0 Replies
Replies (0)