Doc.ImportCCFormat

Purpose
The ImportCCFormat method imports documents from a predefined XML document format.

Required Permissions
None.

Method declaration
Function ImportCCFormat(
     ByVal AppID As String,
     ByVal SessionID As String,
     ByVal XMLDocumentMgmtAction As String,
     Optional ApplyResults As Boolean=True,
     Optional AllowPartialUpdate As Boolean=True)
     As String

Parameters

AppID

The ID of a particular instance of the Product Catalog application. For more information on AppID, refer to “ AppID”  on page  1 .

SessionID

Session ID of the user who is currently logged on to the system.

XMLDocumentMgmtAction

The XML document you are importing.

ApplyResults

Determines if changes are made to the database.

If ApplyResults is true, the changes are made to the database.

If false, no changes are made to the database.

If AllowPartialUpdate is true, a fatal error does not abort the entire operation, but only the current document.

If false, any fatal error aborts the entire upload process and produces an exception report.

Use the list of errors in the return as the master list of errors and error codes.

AllowPartialUpdate

Determines if a fatal error aborts the entire operation or only the current document. See usage notes.


Returns
This method returns an XML document.

<DocumentMgmt xmlns=”CC namespace goes here”>
                <DocumentMgmtActionResults>
                                <DocumentMgmtActionResults>
                                                <DocumentMgmtActionResult>                 

                         {allow multiple – 1 per action}

                                                                <DocumentMgmtHeader>
                                                                                <DocumentDate></DocumentDate>
                                                                                <DocumentTime></DocumentTime>
                                                                                <SubmittingPartner uid=”” nam=””/>
                                                                                <SubmittingUser uid=”” nam=””/>
                                                                                <Comments/>
                                                                </DocumentMgmtHeader>
                                                                <DocumentMgmtActionErrors>

                           {These are fatal errors.}

                <Error id=’1’>Submitting Partner UID not found</Error>
                <Error id=’2’>Submitting User UID not found</Error>
                <Error id=’3’>Part not found. Can’t delete</Error>
                <Error id=’4’>Submitting User doesn’t have delete permission</Error>
                <Error id=’5’>Submitting User doesn’t have add Document permission</ Error>                
                <Error id=’6’>Submitting User doesn’t have edit Document permission</ Error>
                <Warning id=’7’>Document number must be shorter than 50 characters</Error>
                <Error id=’8’>Document name must be shorter than 50 characters</Error>
                <Error id=’9’>Active Flag must be 0 or 1.</Error>
                <Error id=’10’>Document Type ‘Pens’ doesn’t exist</Error>
                <Error id=’11’>Related Part ‘123331323123’ doesn’t exist</Error>
                <Error id=’12’>RelatedPartType ‘Accessory’ doesn’t exist</Error>
                <Error id=’13’>Submitting User doesn’t have add property permission for property ‘Color’</Error>
                <Error id=’14’>Attempt to insert character value ‘ABC’ in NumValue property ‘QtyPerUnit’</Error>
                <Error id=’15’>Property ‘ABC’ with value ‘123’ failed validation</Error>

                                                                {These are non-fatal warnings.}

                <Warning id=’1001’>Restricted UID not found</Error>
                <Warning id=’1002’>Submitting User doesn’t have Edit Document Type permission. Property ‘Color’ was added but will not be returned in queryresults.</Error>
                <Warning id=’1003’>Family ‘Pens’ doesn’t exist.</Error>
                <Warning id=’1004’>None of the Family types matched. The Document was assigned to the default ‘Unassigned Products” family.</Error>
                <Warning id=’1005’>The family path “Car A/Accessories/Doors” could not be resolved to a single family. The document was not assigned to this family and may be orphaned.</Error>

                                                                </DocumentMgmtActionErrors>
                                                <DocumentMgmtActionResult>
                                </DocumentMgmtActionResults>
                </DocumentMgmtActionResult>
</DocumentMgmt>