London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Create Shipping Jurisdiction & Shipping Jurisdiction Group programmatically

Vote:
 

Hello fellow developers!

I'm looking for a way to create shipping jurisdiction and shipping jurisdiction group programmatically.

Best

Emil

#186229
Dec 14, 2017 9:58
Vote:
 

Found it!

// Get
var jurisdicitions = JurisdictionManager.GetJurisdictions(JurisdictionManager.JurisdictionType.Shipping);
// Save/update
JurisdictionManager.SaveJurisdiction(obj)
#186230
Edited, Dec 14, 2017 10:25
Vote:
 

Not want to spoil you but the method you posted is for getting, not creating.

You would have to update the Dto, then use 

SaveJurisdiction(JurisdictionDto dto) to save it back.
#186232
Dec 14, 2017 10:38
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.