Closed shorif2000 closed 2 years ago
@shorif2000, I'm pretty sure you'll find that you need to use the name of the tracking category rather than the ID.
It's very silly, but that's what I discovered when trying to add tracking categories to line items.
@shorif2000, I'm pretty sure you'll find that you need to use the name of the tracking category rather than the ID.
It's very silly, but that's what I discovered when trying to add tracking categories to line items.
How do you set the name because the function clearly says setTrackingCategoryId
and setTrackingOptionId
I have tried below but it errors the same
$tc = new LineItemTracking();
$tc->setTrackingCategoryId($trackingCategoryId);
$tc->setTrackingOptionId($trackingOptionId);
$tc->setName($projectName);
I had to set both names. the docs should be updated to reflect this. this information is not easy to find
$tc = new LineItemTracking();
$tc->setTrackingCategoryId($trackingCategoryId);
$tc->setTrackingOptionId($trackingOptionId);
$tc->setName('Project');
$tc->setOption($projectName);
SDK you're using (please complete the following information):
Describe the bug Adding a tracking category and option for each line item in a purchase order via the api in php does not work.
To Reproduce Steps to reproduce the behavior:
Expected behavior Create a purchase order with tracking
Actual behaviour
It errors with
Unknown tracking details. A Tracking Category did not match a known Active TrackingCategory
. The same steps work for Invoices and Credit Notes