The xAssets API - Method : SpecialAssetSplit

Summary

Split one asset into many assets. sXML is ignored

Parameters

Parameter : sXML

This parameter is ignored

Parameter : sArguments

0
AssetID to split
1
Number of assets to create
2
Quantity to assign to each asset
3
"move" to split all financial data including depreciation transactions
4
Minimum asset quantity - "" means 1, 0 means you are allowing the original asset to have a zero quantity as needed for spares deployment
5
not used

6, 7, 8 etc = Name value pairs for fields to set on the newly created records

Returns

If successful, an empty string is returned. If an error occurred, the return value contains the error message.

Syntax and Examples

Restful syntax with Microsoft Visual Basic

Example 1 - Split AssetID 6 with quantity 5 into 5 assets in total

There is no restful call for this API operation - use a SOAP method instead

SOAP Syntax with Microsoft Visual Basic

Example 1 - Split AssetID 6 with quantity 5 into 5 assets in total


    Try

        ErrorMessage = ""

        Return w.WebSaveSpecial(_hash, _username, _db, _ip, "", "SpecialAssetSplit", {"6", "4", "1", "0", "1", "", "Notes", "Asset Split down to single quantities"}, False, _dns, _port, _scheme, _nonce, _noncedate)

    Catch ex As Exception
        ErrorMessage = ex.Message
        Return "
    End Try

                            

AMSX Syntax

Example 1 - Split AssetID 6 with quantity 5 into 5 assets in total


    SaveSpecial "SpecialAssetSplit","", "6", "4", "1", "0", "1", "", "Notes", "Asset Split down to single quantities"
                        

XCS Syntax

Example 1 - Split AssetID 6 with quantity 5 into 5 assets in total


    Dim ret as String = Server.SaveSpecial("SpecialAssetSplit","", "6", "4", "1", "0", "1", "", "Notes", "Asset Split down to single quantities")
    If ret = " Or ret.Substring(0, 8) = "special=" Then
        MsgBox("Save operation completed.", vbInformation, "Save Data")
    Else
        MsgBox("Save operation failed:" & ret, vbExclamation, "Save Data")
    End If
                        

Download the Visual Studio API Samples Project

Return to the API Index Page