Global Method for Synchronous Printing
If you are writing APEX code to create shipments then you can also now synchronously send the labels to be printed.
Id prefId = 'a025800000bs9Qx'; | |
Id userId = UserInfo.getUserId(); | |
List<Id> attIds = new List<Id>(); | |
attIds.add('00P4I00001124w1'); | |
attIds.add('00P4I00001124lS'); | |
List<Attachment> attachments = [SELECT Id, ParentId, Name, ContentType, Body FROM Attachment WHERE Id IN :attIds]; | |
List<String> statuses = zkmulti.ShipmentInterface.printLabels(attachments, prefId, userId); |