Click or drag to resize

PartServicesCreateOrUpdatePart Method

Creates a new part definition, or updates an existing part definition if the part already exists in the system. This may be an internal part definition, a customer part, and manufacturer part, or a vendor part. The kind of part to be created is determined by the object type of the part parameter.

Namespace:  FactoryLogix.xTend.PartDefinition
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public PartBase CreateOrUpdatePart(
	Guid sessionId,
	PartBase part
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
part
Type: FactoryLogix.xTend.DataObjectsPartBase
An object representing the part to be created or updated, which is of type InternalPart, CustomerPart, ManufacturerPart, or VendorPart. The Id property of the object need not be valid. The PartNumber property of the object must be specified. For assembly type internal parts, the Revision property is also mandatory. For customer, vendor, and manufacturer parts, the Name property of the "related item" (Customer, Vendor, or Manufacturer) must also be specified so that the new part is related properly to the appropriate related item.

Return Value

Type: PartBase
An object derived from type PartBase representing the newly created or updated part, with a valid Id property.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
NotFoundExceptionAn existing part with matching Id property was not found in the system.
AlreadyExistsExceptionAn existing part with matching part number and revision was found in the system.
ConvertAssemblyToPartExceptionConverting an assembly to internal part is not allowed.
CustomerDoesNotExistsExceptionThe customer defined for the customer part does not exist in the system.
ManufacturerDoesNotExistsExceptionThe customer defined for the manufacturer part does not exist in the system.
VendorDoesNotExistsExceptionThe customer defined for the vendor part does not exist in the system.
NotAuthorizedExceptionThrown when not authorized to perform the function.
See Also