Using API to edit job items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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