dimensions web services - rsm uk
TRANSCRIPT
Dimensions
Web Services
Integration Guide
Date: 19th
January 2013
Version: 1.3.6
Author: Stuart Allsopp
Dimensions Web Services – Integration Guide
2
Table of Contents
Overview ............................................................................................................................................................ 4
Technology ..................................................................................................................................................... 4
Connection & Usage Workflow ...................................................................................................................... 5
Principles ........................................................................................................................................................ 5
User Validation ................................................................................................................................................... 6
Service ............................................................................................................................................................ 6
Methods ......................................................................................................................................................... 6
Questions & Answers ..................................................................................................................................... 7
Code Example (VB.NET) .................................................................................................................................. 8
Available Services ............................................................................................................................................... 9
Retrieving ......................................................................................................................................................... 10
Return ........................................................................................................................................................... 10
Code Example (VB.NET) ................................................................................................................................ 11
Collection ...................................................................................................................................................... 11
Coding Example (VB.NET) ............................................................................................................................. 14
Updating ........................................................................................................................................................... 15
Coding Example (VB.NET) ............................................................................................................................. 16
Configuration File ............................................................................................................................................. 17
Ticket Database Location ............................................................................................................................. 17
Access Policy ..................................................................................................................................................... 17
Changing XML Template Files .......................................................................................................................... 18
VersionControl.xml ....................................................................................................................................... 18
Available Methods (Appendix) ......................................................................................................................... 20
Collections .................................................................................................................................................... 20
Returns ......................................................................................................................................................... 22
Updates ........................................................................................................................................................ 24
Deletes .......................................................................................................................................................... 28
Ticket Database Installer (Appendix) ............................................................................................................... 29
Ticket Database ............................................................................................................................................ 29
Add Scripts .................................................................................................................................................... 30
Change History ................................................................................................................................................. 31
Dimensions Web Services – Integration Guide
4
Overview
The Dimensions Web Service API allows you to retrieve and update information from your Dimensions
database using a suite of standard methods.
The advantage of using this functionality is that the developer does not need to have direct access to or
comprehensive understanding of the Dimensions database schema.
Although security is an important factor when it comes to implementing a web service interface this is not
its sole purpose. The web service interface provides an extrapolated agnostic layer of code that allows any
web service compliant language to interact with the functions and methods available giving you more
flexibility when choosing when and how your systems are integrated as well as by whom.
Technology
The technology used in the Dimensions Web Service API utilises the WCF (Windows Communication
Framework). The Dimensions Web Service API is compiled to run within the IIS (Internet Information
Server) using a .NET Framework 3.5 application pool.
If you wish to secure the web service under an HTTPS protocol you should install and configure a valid
security certificate to deliver this security requirement.
The Dimensions Web Service API uses SOAP (Simple Object Application Protocol) to receive and send
messages to the calling application. Using this protocol it uses complex types to describe the different
objects within the Dimensions environment making it a flexible method of delivering complicated
information.
Dimensions Web Services – Integration Guide
5
Connection & Usage Workflow
The interaction with the web service can be split into 3 distinct areas, all of which are accessed by a request
and response message system.
Request Record or
Transaction
Request a record or transaction using a unique identifier for that item known
within the Dimensions database.
To fetch a customer record you would request it by passing the customer account
code.
To fetch a purchase ledger invoice you would request it by passing the audit
number of the invoice.
Update Record or
Transaction
Update a record or transaction is done by either first requesting the object and
changing the properties before requesting an update of the object, or by
populating a blank object with valid property values and requesting an update by
passing the object.
Request Collection Request a collection of records or transactions using a search criteria object and
receiving back a collection or array of objects representing the data requested. If
there is a large volume of data, you are able to page the requests by specifying
how many records / objects should be returned per page and repeating the
request until it has been completely fulfilled.
Principles
The basic principle of the Dimensions Web Service API is based around the existing and established Dimensions Database API. By setting the properties on the objects introduced through the API is the same as setting the parameters in the stored procedures and temporary tables of the database API.
Dimensions Web Services – Integration Guide
6
Note: You should only set the properties that you wish updating to the database and by leaving a property untouched or set to NULL will imply that you wish to accept the default value defined by Dimensions and the security setting associated with the user record used.
User Validation Before you are able to interact with a Dimensions database you will need to validate yourself as a valid
user.
The Dimensions Web Service API is a stateless environment therefore in this environment you would either
need to pass credentials with every request to the API or to provide a “ticket” proving the user as a
previously validated process.
Service
The service dedicated to providing and validating user credentials is available in the Dimensions Web
Service API and is called “CredentialsService.svc”. You can gain access to the methods available on this
service by reviewing the WDSL associated with the service by connecting to
http://webservice/credentialsservice.svc?wsdl
Methods
Dimensions Web Services – Integration Guide
7
CreateNewTicket
Parameters DimensionsLogonObject Simple object containing the logon credentials for the
Dimensions database.
Result String This will either return a valid ticket in the format of a
GUID or an error message.
This method allows you to provide standard dimensions logon credentials and receive back a valid
connection ticket that can be associated with any subsequent calls to the service.
DimensionsLogonObject
SiteReference String Access Customer Reference used for support and
licensing of the Dimensions application.
Remember this customer should be licensed for the
SDK.
UserID String Short (4 character) user identifier which will
correspond to a valid user record in the Dimensions
database.
UserName String Full user name for both Dimensions and SQL Server
Password String A valid password for the user specified.
Server String The full qualified network address and instance name
of the SQL server holding the Dimensions database.
Remember this name is relative to the server holding
the web service and not necessarily the client.
Database String A valid Dimensions database name.
Once the method returns a valid ticket, the ticket can then be associated with subsequent calls on any web
service to that Dimensions database, by specifying this ticket the user credentials associated with the ticket
will be used to access the database.
Questions & Answers
What does a valid ticket look like? A valid ticket is represented as a GUID (Globally
Unique Identifier).
e.g. babb0c7a-5000-466a-bffd-492af2311a4c
How Long does a ticket last? A ticket will by default last for 20 minutes of
inactivity. Any use of the ticket in that time will
Dimensions Web Services – Integration Guide
8
extend the life of the ticket for another 20 minutes.
Note: This can be altered by changing the settings in
the tickets database allowing you to keep a ticket
open and available for up to 9,999 minutes.
Keeping a ticket open has no processing requirement
but is only there to allow the administrator control
over security policy.
What do I do if a ticket expires? If you make a call to a service and the error message
returns with an expired ticket message, then you
will need to renew the ticket by using the
“CreateNewTicket” method.
Can I have more than one ticket open at a time? You are able to have as many tickets open at once
as you require connecting to different combinations
of users, services and databases.
Where are the tickets held? The open valid tickets are stored in a dedicated SQL
database that can be located on any SQL Server that
can be accessed by the Web Service.
Code Example (VB.NET)
Public Sub Logon() Dim Service As New CredentialsServiceClient Dim Details As New DimensionsLogonObject Details.UserID = "SA" Details.UserName = "sa" Details.Password = "admin" Details.Server = "localhost" Details.SiteReference = "DM1234" Details.Database = "BENSON" Dim Result As String = "" Result = Service.CreateNewTicket(Details) End Sub
Dimensions Web Services – Integration Guide
9
Available Services There are multiple services available that are able to be used independently or in conjunction with each
other. Each service represents a logical area of the Dimensions software and within each service there are
a varying number of methods that give you access to the functions of the service.
CredentialsService.svc This service is dedicated to the management of user credentials and
providing tickets to be used with the other services within the API.
NominalLedgerService.svc This service is dedicated to retrieving and updating information directly
from and into the nominal ledger. For example Nominal Accounts,
Categories and Journals.
SalesLedgerService.svc This service is dedicated to retrieving and updating information directly
from and into the sales ledger. For example Customers, Addresses,
Analysis, Invoices and Receipts.
PurchaseLedgerService.svc This service is dedicated to retrieving and updating information directly
from and into the purchase ledger. For example Suppliers, Addresses,
Analysis, Invoices and Payments.
ProjectCostingService.svc This service is dedicated to retrieving and updating information directly
from and into project costing. For example Projects, Resources, Cost
centres and Timesheets.
PurchaseOrdersService.svc This service is dedicated to retrieving and updating information directly
from and into purchase order processing. For example Orders, Credit
Notes and Price Records.
SalesOrdersService.svc This service is dedicated to retrieving and updating information directly
from and into sales order processing. For example Orders, Credit Notes
and Price Records.
StockControlService.svc This service is dedicated to retrieving and updating information directly
from and into stock control. For example Stock Records, Sub Analysis and
Stock Movements.
SystemControlService.svc This service is dedicated to retrieving and updating information directly
from and into the system defaults. For example Currency Rates, VAT
Rates and Sort Keys.
Dimensions Web Services – Integration Guide
10
Retrieving The retrieval process is broken down into two clear types of methods. The return method allows you to
identify an individual record or transaction and return it back to your application. The collection method
allows you to specify search criteria and return back a collection of records or transactions that are valid for
that criterion.
Return
The return method uses a request and response message to allow you to identify the record and return it
back to your environment in its full form.
CustomerRecord_Return(request as CustomerReturnRequest) as CustomerReturnResponse
The request object is define with a number of properties that allow you to validate yourself as a valid user
as well as specifying which record (customer) you wish to return.
CustomerReturnRequest
Ticket String A valid ticket generated from the CreateNewTicket
method in the CredentialsService.svc.
CustomerCode String 10 Character unique code representing an individual
customer record.
CustomerReturnResponse
Credentials DimensionsLogonObject A copy of the credentials associated with the ticket
submitted on the original request.
Ticket String A copy of the original ticket string submitted on the
original request.
ErrorID Integer Error number generated if the request was not able
to be processed.
ErrorMessage String Error message generated if the request was not able
to be processed.
VersionNo String The version number of the web service API.
Record CustomerRecord An object representing the customer information on
file for the requested record.
Dimensions Web Services – Integration Guide
11
Code Example (VB.NET)
Public Sub FetchCustomer(ByVal Code As String) Dim Service As New SalesLedgerServiceClient 'Create new connection to service Dim request As New CustomerReturnRequest 'Create a new request Dim response As CustomerReturnResponse Dim local_Ticket As String = ReturnTicket() ' logon and return valid ticket request.CustomerCode = "ABL01" 'specify the customer to be found request.Ticket = local_Ticket 'attach the valid ticket response = Service.CustomerRecord_Return(request) If response.ErrorID <> 0 Then MsgBox(response.ErrorMessage) End If Service.Close() End Sub
The above example can be used to return any of the records or transactions associated with the sales
ledger.
Collection
The collection method uses a request and response message to allow you to specify a search criterion that
returns a summary collection of data that represents the records or transactions search for.
Note: You will not be able to update the objects returned in the collection you should subsequently use the
“return” method to get the whole object for the item you have identified from the collection.
NominalRecord_Collection (request as NominalCollectionRequest) as NominalCollectionResponse
The request object is define with a number of properties that allow you to validate yourself as a valid user
as well as specifying the criteria to be used to return the collection of records.
NominalCollectionRequest
Ticket String A valid ticket generated from the CreateNewTicket
method in the CredentialsService.svc.
Search searchNominalList Object specifying the criteria for searching the list of
nominal records.
CountOnly Boolean Return only the count of records that comply with the
criteria and not the records themselves.
AllRecords Boolean Returns all the records that comply with the criteria
and will ignore any paging settings specified.
Dimensions Web Services – Integration Guide
12
MaxRecords Integer Allows the user to specify how many records can be
returned in one go, this property is overridden by
“AllRecords”
StartPosition Integer Allows the user to specify the start index of the page
of records.
SearchNominalList
NomnialCode TextSearch Search criteria for the nominal code
Name TextSearch Search criteria for the nominal name
MajorHeadingCode NumberSearch Search criteria for major heading code
CurrencyCode TextSearch Search criteria for currency symbol
IsBank BooleanSearch Specifies whether the accounts returned should be
bank accounts
IsNormal BooleanSearch Specifies whether the accounts returned are just
standard nominal accounts
IsRounding BooleanSearch Specifies whether the accounts returned should be
rounding accounts
IsDebtors BooleanSearch Specifies whether the accounts returned should be
debtor control accounts
IsCreditors BooleanSearch Specifies whether the accounts returned should be
creditor control accounts
TextSearch
Include Boolean Sets whether this criteria item should be included in
the search
Criteria TextSearchStyle An enumerated value representing the criteria style
of the search.
ValueFrom String Value to be used in the criteria
ValueTo String Value to be used in the criteria
Dimensions Web Services – Integration Guide
13
NumberSearch
Include Boolean Sets whether this criteria item should be included in
the search
Criteria TextSearchStyle An enumerated value representing the criteria style
of the search.
ValueFrom Double Value to be used in the criteria
ValueTo Double Value to be used in the criteria
BooleanSearch
Include Boolean Sets whether this criteria item should be included in
the search
Value Boolean Value to be used in the criteria
NominalCollectionResponse
CollectionColumns String() List of the column names being returned in the
collection.
CollectionPaging CollectionPaging Object representing the paging settings requested
and properties required to fetch the next page
Credentials DimensionsLogonObject A copy of the credentials associated with the ticket
submitted on the original request.
Ticket String A copy of the original ticket string submitted on the
original request.
ErrorID Integer Error number generated if the request was not able
to be processed.
ErrorMessage String Error message generated if the request was not able
to be processed.
VersionNo String The version number of the web service API.
Search searchNominalList A copy of the original search criteria applied
Collection NominalRecord() A collection of nominal records that comply to the
Dimensions Web Services – Integration Guide
14
search criteria and paging requirements
CollectionPaging
TotalRecordCount Integer Total records found using the criteria
RecordCount Integer Records return in the current page
LastPage Boolean Indicator to specify whether the page being returned
is the last page
MaxRecords Integer Copy of the MaxRecords property set on the request
object
StartPosition Integer This is the updated start position from the paging
settings and should be copied to the start position of
the request for the next page.
Coding Example (VB.NET)
Public Sub FetchNominalList() Dim local_nominals As New ArrayList ‘initialise result array Dim Service As New NominalLedgerServiceClient 'Create a new connection to service Dim request As New NominalCollectionRequest 'Create a new request Dim response As NominalCollectionResponse Dim search As New searchNominalList Dim local_complete As Boolean = False Dim local_Ticket As String = ReturnTicket() 'logon and return valid ticket search = New searchNominalList search.NominalCode = New NominalLedgerService.TextSearch search.NominalCode.Include = True search.NominalCode.Criteria = NominalLedgerService.TextSearchStyle.Begins search.NominalCode.ValueFrom = "1" request.MaxRecords = 50 'set max number of records per page request.StartPosition = 0 'set initial start position While local_complete = False request.Search = search 'apply criteria response = Service.NominalRecord_Collection(request) If response.ErrorID = 0 Then local_nominals.AddRange(response.Collection.ToArray) If response.CollectionPaging.LastPage = False Then request.StartPosition = response.CollectionPaging.StartPosition ' specify start position of next page Else local_complete = True End If Else Exit While
Dimensions Web Services – Integration Guide
15
End If End While Service.Close() End Sub
Note: The above example will return a full list of nominal codes where the nominal code starts with ‘1’ in
pages of 50.
Updating
The update method allows you to identify an individual record or transaction to be returned and updated
or inserted into the Dimensions database.
CostingTransactionTimesheetUpdate(request as CostingTimesheetUpdateRequest) as
CostingTimesheetUpdateResponse
The request object is define with a number of properties that allow you to validate yourself as a valid user
as well as specifying which record or transaction (timesheet) you wish to update.
CostingTimesheetUpdateRequest
Ticket String A valid ticket generated from the CreateNewTicket
method in the CredentialsService.svc.
Transaction CostingTimesheet An object describing the timesheet that you would
like to update
CostingTransactionUpdateResponse
Credentials DimensionsLogonObject A copy of the credentials associated with the ticket
submitted on the original request.
Ticket String A copy of the original ticket string submitted on the
original request.
ErrorID Integer Error number generated if the request was not able
to be processed.
ErrorMessage String Error message generated if the request was not able
to be processed.
VersionNo String The version number of the web service API.
Dimensions Web Services – Integration Guide
16
Transaction CostingTransaction An object describing the transaction now it has been
updated into the database.
Coding Example (VB.NET)
Public Sub CreateTimesheet() Dim service As New ProjectCostingServiceClient Dim request As New CostingTimesheetUpdateRequest Dim local_Ticket As String = ReturnTicket() 'logon and return valid ticket Dim local_timesheet As New CostingTimesheet Dim local_lines As New Collection(Of CostingTimesheetDetail) Dim local_item As New CostingTimesheetDetail local_item.ProjectCode = "PRJ01" local_item.CostcentreCode = "CC01" local_item.ResourceCode = "RES01" local_item.Quantity = 5 local_lines.Add(local_item) local_timesheet.ActualEstimate = modEnumsActualEstimateType.Actual local_timesheet.PostingDate = Now.Date local_timesheet.DetailLines = local_lines.ToArray request.Ticket = local_Ticket request.Transaction = local_timesheet Dim response As CostingTransactionUpdateResponse response = service.CostingTimesheetUpdate(request) If response.ErrorID <> 0 Then MsgBox(response.ErrorMessage) Else MsgBox("Audit No Is : " & CStr(response.Transaction.DetailLines(0).AuditNo)) End If service.Close() End Sub
Dimensions Web Services – Integration Guide
17
Configuration File
The Web.Config file located in the root of the Web Service Application will control the parameters needed
for the application.
Ticket Database Location
<appSettings>
<add key="ServerName" value="localhost" />
<add key="Database" value="TicketDatabase"/>
<add key="UserName" value="sa"/>
<add key="Password" value="admin"/>
</appSettings>
You can alter these values to point at the SQL Server that the ticket database is installed on.
The rest of the settings in this file are relevant to the implementation of the WCF service and should not be
changed without guidance.
Access Policy
If you wish to access the web services from a server that is not on the same domain as the web server itself
you should include a client access policy xml file to allow access to the service.
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="http://*" />
<domain uri="https://*" />
</allow-from>
<grant-to>
<resource include-subpaths="true" path="/" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
If this xml is saved as “clientaccesspolicy.xml” at the root of the web service application.
Dimensions Web Services – Integration Guide
18
Changing XML Template Files Dimensions Web Services knows how the default Dimensions database is configured, and what columns of
data are mapped to what properties of the relevant web service objects.
These settings can be tailored and altered depending on the requirements of the individual
implementation.
This can also be quite important when you are utilising the web services against older versions of
Dimensions.
In the standard web service install (IIS Application) you will find a folder in the bin directory
(c:\Inetpub\wwwroot\DimensionsWebService\bin\) called “Templates”, this folder contains all the
mappings and settings for the web services. By default these settings should remain untouched, but under
specific circumstances they are available to be altered.
The folders within the templates section are broken down as follows;
Lists - Definition of the objects returned and search criteria of the collections
PostBatch - Definition of the mapping to the stored procedures for posting transaction in the
batch.
Records - Definitions of the objects returned and the mapping to the stored procedures for
the updating of records.
Transactions - Definitions of the objects returned and the mapping to the temporary tables and
stored procedures for updating transactions.
VersionControl.xml
This control file works as an override of the standard mapping depending on versions of Dimensions. The
system will validate the version of Dimensions it is connected to against this list, if an entry does not exist
then the standard settings will be used, but if an entry for the object being posted is found in this file then
that xml definition will be used instead.
<?xml version="1.0" encoding="utf-8" ?> <Changes> <Version Id="250a"> <Object Id="SalesOrder" Type="Transaction">SalesOrder250a.xml</Object> <Object Id="SalesOrderEstimate" Type="Transaction">SalesOrder250a.xml</Object> <Object Id="SalesOrderProforma" Type="Transaction">SalesOrder250a.xml</Object> <Object Id="SalesOrderCreditNote" Type="Transaction">SalesOrder250a.xml</Object> <Object Id="SalesReceipt" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="SalesInvoice" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="SalesCreditNote" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="SalesDebitAdjustment" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="SalesCreditAdjustment" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="SalesTransaction" Type="Transaction">SalesTransaction250a.xml</Object> <Object Id="PurchasePayment" Type="Transaction">PurchaseTransaction250a.xml</Object> <Object Id="PurchaseInvoice" Type="Transaction">PurchaseTransaction250a.xml</Object> <Object Id="PurchaseCreditNote" Type="Transaction">PurchaseTransaction250a.xml</Object> <Object Id="PurchaseDebitAdjustment" Type="Transaction">PurchaseTransaction250a.xml</Object> <Object Id="PurchaseCreditAdjustment" Type="Transaction">PurchaseTransaction250a.xml</Object> <Object Id="SalesTransaction" Type="Transaction">PurchaseTransaction250a.xml</Object> </Version>
Dimensions Web Services – Integration Guide
19
<Version Id="250d"> <Object Id="CustomerRecord" Type="Record">CustomerRecord250d.xml</Object> <Object Id="StockRecord" Type="Record">StockRecord250d.xml</Object> <Object Id="SalesOrder" Type="Transaction">SalesOrder250d.xml</Object> </Version> <Version Id="250e"> <Object Id="BudgetRecord" Type="Record">BudgetRecord250e.xml</Object> <Object Id="BudgetRecord" Type="List">master_budgetlist250e.xml</Object> </Version> </Changes>
Dimensions Web Services – Integration Guide
20
Available Methods (Appendix)
Collections
Service Method Description
SalesLedgerService.svc CustomerRecord_Collection Customer Records
CustomerAgedAnalysis_Collection Customer records with an aged
breakdown of debt
SalesTransaction_Collection Sales Transaction header summary
records
SalesTransactionDetail_Collection Sales Transaction detail records
SalesDoubleEntry_Collection Double entry breakdown of sales
transactions
SalesAnalysis_Collection Sales Analysis Records
TermsTemplate_Collection Terms Template Records
CustomerAddress_Collection Customer Address Records
CreditControlNotes_Collection Notes stored against transactions for
credit control purposes.
PurchaseLedgerService.svc SupplierRecord_Collection Supplier Records
SupplierAgedAnalysis_Collection Supplier records with an aged
breakdown of credit
PurchaseAnalysis_Collection Purchase Analysis Records
SupplierAddress_Collection Supplier Address Records
PurchaseTransaction_Collection Purchase Transaction header
summary records
PurchaseTransactionDetail_Collection Purchase transaction detail records.
PurchaseDoubleEntry_Collection Double entry breakdown of
purchase transactions
RejectionDictionary_Collection Rejection Dictionary records
NominalLedgerService.svc NominalRecord_Collection Nominal Records
MajorHeading_Collection Major Headings
NominalCategory_Collection Nominal Category Records
Dimensions Web Services – Integration Guide
21
NominalTransaction_Collection Nominal Transaction head summary
records
NominalDoubleEntry_Collection Nominal double entry details
ProjectCostingService.svc ProjectRecord_Collection Project Records
ResourceRecord_Collection Resource Records
ProjectCostCentreRecord_Collection Project cost centre records
CostingTransaction_Collection Costing transaction summary
StockControlService.svc StockRecord_Collection Stock Records
StockPrice_Collection Stock Buying and Selling Prices
StockSubAnalysis_Collection Stock Sub Analysis Records
StockLinkedItem_Collection Stock Linked Item Collections
StockAlternativeItem_Collection Stock Alternative Item Collections
StockTransaction_Collection Stock Movements
StockSerialNumber_Collection Stock Serial Numbers
SalesOrdersService.svc PriceRecord_Collection Price Records
SalesOrderTransaction_Collection Sales Order Transaction header
summary records
SalesOrderTransactionDetail_Collection Sales Order Transaction detail
records
AdvancedPriceMatrix_Collection Return a collection of valid prices for
a customer.
PurchaseOrdersService.svc PriceRecord_Collection Price Records
PurchaseOrderTransaction_Collection Purchase Order Transaction header
summary records
PurchaseOrderTransactionDetail_Collection Purchase Order Transaction detail
records
SystemControlService.svc SubLedger_Collection Sub Ledger Records
SortKey_Collection Sort Key Records
TransactionUserKey_Collection Transaction User Key Records
DiaryEntry_Collection Diary Entry Records
Dimensions Web Services – Integration Guide
22
TaxRate_Collection VAT Rate Records
CurrencyRate_Collection Currency Rates Records
TradingCurrency_Collection Trading Currency Records
UserRecord_Collection User Records
BudgetRecord_Collection Record Budgets
Returns
Service Method Description
SalesLedgerService.svc CustomerRecord_Return Customer Record
AnalysisRecord_Return Analysis Record
CustomerAddress_Return Customer Address Record
SalesTransactionGenericReturn Full sales transaction including detail
lines
TermsTemplate_Return Terms Template Record
CreditControlNote_Return Credit control note record
DefaultAnalysis_Return Returns the default analysis
SalesTransactionNotes_Return Will return the notes and memo
fields on a posted transaction.
PurchaseLedgerService.svc SupplierRecord_Return Supplier Record
SupplierAddress_Return Supplier Address Record
AnalysisRecord_Return Analysis Record
RejectionDictionary_Return Rejection Dictionary Record
PurchaseTransactionGenericReturn Full purchase transaction including
detail lines
DefaultAnalysis_Return Returns the default analysis
PurchaseTransactionNotes_Return Returns the notes and memo fields
on a posted transaction.
NominalLedgerService.svc NominalRecord_Return Nominal Records
MajorHeading_Return Major Heading Records
Dimensions Web Services – Integration Guide
23
NominalCategory_Return Nominal Category Records
NominalTransactionGenericReturn Nominal Transactions including line
detail
ProjectCostingService.svc ProjectRecord_Return Project Records
ResourceRecord_Return Resource Records
ProjectCostCentreRecord_Return Cost centre Records
CostTransactionGenericReturn Costing Transactions including line
detail
StockControlService.svc StockRecord_Return Stock Records
StockSubAnalysis_Return Stock Sub Analysis Records
StockPrice_Return Stock Buying and Selling Prices
StockLinkedItem_Return Stock Linked Item Records
StockAlternativeItem_Return Stock Alternative Item Records
StockTransactionGenericReturn Stock Movements including line
details
SalesOrdersService.svc PriceRecord_Return Price Records
SalesOrderTransactionGenericReturn Sales Order Transactions including
line details
AdvancedPriceMatrixReturn Return a advanced price matrix
template that matches the criteria.
PurchaseOrdersService.svc PriceRecord_Return Price Records
PurchaseOrderTransactionGenericReturn Purchase Order Transactions
including line details
SystemControlService.svc SubLedger_Return Sub Ledger Records
SortKey_Return Sort Key Records
TransactionUserKey_Return Transaction User Key Records
DiaryEntry_Return Diary Records
TaxRate_Return VAT Rate Records
CurrencyRate_Return Currency Rate Records
TradingCurrency_Return Trading Currency Records
Dimensions Web Services – Integration Guide
24
Defaults_Return System default data
BudgetRecord_Return Record Budgets
DefaultExchangeRate_Return Returns the default exchange rate
DefaultTaxRate_Return Returns the default tax rate
DefaultYearPeriod_Return Returns the current year and period
and suggested year and period for
the module and date specified.
Updates
Service Method Description
SalesLedgerService.svc CustomerRecord_Update Customer Record
CustomerRecord_UpdateBasic Customer Record using generic
types
SalesAnalysis_Update Sales Analysis Record
SalesAnalysis_UpdateBasic Sales Analysis Record using generic
types
CustomerAddress_Update Customer Address Record
CustomerAddress_UpdateBasic Customer Address Record using
generic types
TermsTemplate_Update Terms Template Record
SalesTransactionGenericUpdate Sales Transaction
SalesTransactionInvoiceUpdate Sales Invoice Transaction
SalesTransactionReceiptUpdate Sales Receipt Transaction
SalesTransactionCreditNoteUpdate Sales Credit Note Transaction
SalesTransactionDebitAdjustmentUpdate Sales Debit Adjustment Transaction
SalesTransactionCreditAdjustmentUpdate Sales Credit Adjustment Transaction
PostSalesLedgerBatch Post a number of specified
transactions from the batch
PostSalesAllocation Will allocate together a number of
specified transactions.
CreditControlNote_Update Credit control notes against
Dimensions Web Services – Integration Guide
25
transactions.
SalesBulkReceipt_Update Post multiple receipts and
allocations for a list of transactions.
SalesTransactionNotes_Update Update the notes and memo fields
on a specific posted transaction.
PurchaseLedgerService.svc SupplierRecord_Update Supplier Record
SupplierRecord_UpdateBasic Supplier Record using generic types
PurchaseAnalysis_Update Purchase Analysis Record
PurchaseAnalysis_UpdateBasic Purchase Analysis Record using
generic types
SupplierAddress_Update Supplier Address Record
SupplierAddress_UpdateBasic Supplier Address Recording using
generic types
RejectionDictionary_Update Rejection Dictionary Record
RejectionDictionary_UpdateBasic Rejection Dictionary Record using
generic types
PurchaseTransactionGenericUpdate Purchase Transaction
PurchaseTransactionInvoiceUpdate Purchase Invoice Transaction
PurchaseTransactionPaymentUpdate Purchase Payment Transaction
PurchaseTransactionCreditNoteUpdate Purchase Credit Note Transaction
PurchaseTransactionDebitAdjustmentUpdate Purchase Debit Adjustment
Transaction
PurchaseTransactionCreditAdjustmentUpdate Purchase Credit Adjustment
Transaction
PostPurchaseLedgerBatch Post a number of specified
transactions from the batch
PostPurchaseAllocation Will allocate together a number of
specified transactions.
PurchaseTransactionNotes_Update Updates the notes and memo fields
on a posted transaction.
NominalLedger.svc NominalRecord_Update Nominal Records
NominalRecord_UpdateBasic Nominal Records using generic types
Dimensions Web Services – Integration Guide
26
MajorHeading_Update Major Headings
MajorHeading_UpdateBasic Major Headings using generic types
NominalCategory_Update Nominal Category Records
NominalCategory_UpdateBasic Nominal Category Records using
generic types
NominalTransactionGenericUpdate Nominal Transactions
NominalJournalUpdate Nominal Journal Transactions
NominalRecurringJournalUpdate Nominal Recurring Journal
Transaction
NominalTaxJournalUpdate Nominal VAT Journal Transaction
NominalRecurringTaxJournalUpdate Nominal Recurring VAT Journal
Transaction
PostNominalLedgerBatch Post a number of specified
transactions from the batch
ProjectCostingService.svc ProjectRecord_Update Project Records
ProjectRecord_UpdateBasic Project Records using generic types
ResourceRecord_Update Resource Records
ResourceRecord_UpdateBasic Resource Records using generic
types
ProjectCostCentreRecord_Update Costcentre Records
ProjectCostCentreRecord_UpdateBasic Costcentre Records using generic
types
CostingTransactionGenericUpdate Costing Transactions
CostingTimesheetUpdate Timesheet Transactions
CostingMiscellaneousCostUpdate Miscellaneous Cost Transactions
CostingMiscellaneousSaleUpdate Miscellaneous Sales Transactions
PostProjectCostingBatch Post a number of specified
transactions from the batch
StockControlService.svc StockRecord_Update Stock Records
StockRecord_UpdateBasic Stock Records using generic types
Dimensions Web Services – Integration Guide
27
StockPrice_Update Stock Selling and Buying prices
StockPrice_UpdateBasic Stock Selling and Buying prices using
generic types
StockSubAnalysis_Update Stock Sub Analysis Records
StockSubAnalysis_UpdateBasic Stock Sub Analysis Records using
generic types
StockLinkedItem_Update Stock Linked Item Records
StockLinkedItem_UpdateBasic Stock Linked Item Records using
generic types
StockAlternativeItem_Update Stock Alternative Item Records
StockAlternativeItem_UpdateBasic Stock Alternative Item Records using
generic types
StockTransactionGenericUpdate Stock Transactions
PostStockControlBatch Post a number of specified
transactions from the batch
PurchaseOrdersService.svc PriceRecord_Update Price Records
PriceRecord_UpdateBasic Price Records using generic types
PurchaseOrderTransactionGenericUpdate Purchase Order Transactions
PurchaseOrderUpdate Purchase Order Transactions
PurchaseOrderCreditNoteUpdate Purchase Order Credit Note
Transactions
SalesOrdersService.svc PriceRecord_Update Price Records
PriceRecord_UpdateBasic Price Records using generic types
SalesOrderTransactionGenericUpdate Sales Order Transactions
SalesOrderUpdate Sales Order Transactions
SalesOrderCreditNoteUpdate Sales Order Credit Note Transactions
SalesOrderEstimateUpdate Sales Order Estimate Transactions
SalesOrderProformaUpdate Sales Order Proforma Transactions
ProcessSalesOrderBatch Process an order through the sales
order batch
Dimensions Web Services – Integration Guide
28
ProcessSalesOrderDocument Confirm a document as being
printed
ConvertEstimateToOrder Convert an estimate to a sales order
ConvertProformaToOrder Convert a proforma to a sales order
SystemControlService.svc SubLedger_Update Sub Ledger Records
SubLedger_UpdateBasic Sub Ledger Records using generic
types
SortKey_Update Sort Key Records
SortKey_UpdateBasic Sort Key Records using generic types
TransactionUserKey_Update Transaction User Key Records
DiaryEntry_Update Diary Records
DiaryEntry_UpdateBasic Diary Records using generic types
TaxRate_Update VAT Rate Records
CurrencyRate_Update Currency Rate Records
CurrencyRate_UpdateBasic Currency Rate Records using generic
types
TradingCurrency_Update Trading Currency Records
BudgetRecord_Update Record Budgets
Deletes
Service Method Description
SalesLedgerService.svc CustomerRecord_Delete Delete a customer record
TermsTemplateRecord_Delete Delete a terms template
CustomerAddress_Delete Delete a customer address
SalesAnalysis_Delete Delete a sales analysis record
DeleteBatchedTransaction Delete a transaction from the batch
PurchaseLedgerService.svc SupplierRecord_Delete Delete a supplier record
SupplierAddress_Delete Delete a supplier address
PurchaseAnalysis_Delete Delete a purchase analysis
DeleteBatchedTransaction Delete a transaction from the batch
Dimensions Web Services – Integration Guide
29
NominalLedgerService.svc NominalRecord_Delete Delete a nominal record
DeleteBatchedTransaction Delete a transaction from the batch
SalesOrdersService.svc PriceRecord_Delete Delete a price record
DeleteBatchedTransaction Delete a transaction from the batch
PurchaseOrdersService.svc PriceRecord_Delete Delete a price record
DeleteBatchedTransaction Delete a transaction from the batch
ProjectCostingService.svc ProjectRecord_Delete Delete a project record
ProjectCostcentre_Delete Delete a costcentre record
ResourceRecord_Delete Delete a resource record
DeleteBatchedTransaction Delete a transaction from the batch
StockControlService.svc StockRecord_Delete Delete a stock record
StockSubAnalysis_Delete Delete a stock sub analysis record
DeleteBatchedTransaction Delete a transaction from the batch
Ticket Database Installer (Appendix) The ticket database installer has two purposes;
1. It will install and initialise a security ticket database on a selected SQL server, this will then need to
be specified in the web.config of the Web Service Application.
2. It will allow you to apply additional SQL scripts and objects to the target Dimensions database.
Ticket Database
This screen is specifically for setting up and
upgrading the tickets database located on “a sql
server”, this does not need to be the same SQL
server as the Dimensions database but does need to
be accessible by the web application.
Server : Machine name or UNC path
(including instance name) of the SQL server to be
used.
User Name: SQL user name to be used to
connect to the server, this user must have the rights
Dimensions Web Services – Integration Guide
30
to create and/or manage a database on the server.
Password: Password for the above user.
Database: This dropdown will contain a list of existing ticket databases on this server, if this is the first
time you have installed this or you wish to generate a new ticket database, type the name of the database
you wish to create into the box.
Once you have completed the fields, the button below will be activated and you will be able to choose the
relevant action.
Note : Remember to update the web.config of the web service application with the new details of the tickets
database.
Add Scripts
This tab of the application is specifically targeted at
apply additional SQL objects and scripts to the
databases you will be accessing with the Dimensions
Web Services.
The scripts are manifested with a version number and
will offer up different scripts depending on the
validated version of the target database. Each of the
scripts are there to add additional functionality to the
Dimensions database and in some cases will need to be
applied to gain access to methods within the
application.
You will need to use a SQL user account that has enough privileges to administer and manage the database
objects on the server.
Dimensions Web Services – Integration Guide
31
Change History
Version Change Summary
1.1 1. Release of Dimensions Web Services
1.2 1. Batch Processing options added for Sales, Purchase, Nominal, Stock, Costing and Sales
Order Processing
2. Document Update process added for Sales Order Processing and Purchase Order
Processing.
3. Logon function altered to use Dimensions User Security and not SQL User Security
4. Error ID updated to report an error number and not just the error message
1.3 1. Ticket database updated to validate application and version of application.
2. Version management system to allow multiple versions of Dimensions to be supported
by the same service.
3. Customer record object supports additional custom fields for 2.50d
4. Stock record object supports additional custom fields for 2.50d
5. User Record collection added
6. Added support for Advanced Price Matrix on Sales Orders for 2.50d
7. Sales Order object supports additional custom fields for 2.50d
8. Convert Proforma to Order added.
9. Convert Estimate to Order added.
10. Added Advanced Price Matrix Return Function for 2.50d onwards.
1.3.1 1. Stock Movement Update fix
2. Nominal Journal Update fix
3. Added Record Budget Return, Update and Collection for 2.50e and before
1.3.2 1. Fix to FinancialSummary to send DefaultValue for zero enumeration and null balances.
1.3.3 1. Sales Order object made backward compatible to 2.50a
2. Sales Transaction objects made backward compatible to 2.50a
3. Header Reference search added to the Sales Transaction collection
4. Header Reference search added to the Purchase Transaction collection
5. Header Reference search added to the Nominal Transaction collection
1.3.4 1. Order Number search added to Sales Transaction collection
2. Credit Control Notes Collection added.
3. Credit Control Notes Return added.
4. Credit Control Noted Update added.
5. Added Advanced Price Matrix Collection for 2.50d onwards.
6. Added AgedAnalysis section to FinancialSummary for CustomerRecord for 2.50d
onwards.
Dimensions Web Services – Integration Guide
32
7. Added CustomerAgedAnalysis_Collection
8. Added SupplierAgedAnalysis_Collection
9. Added DefaultAnalysis_Return to Sales and Purchase services
10. Added DefaultExchangeRate_Return
11. Added DefaultTaxRate_Return
12. Added DefaultYearPeriod_Return
13. Added DeleteBatchedTransaction to all modules
14. Addes BulkReceipts to Sales Service
15. Added _Delete method to primary records in all modules
1.3.4.3 1. Added SalesTransactionNotes_Return
2. Added SalesTransactionNotes_Update
3. Added PurchaseTransactionNotes_Return
4. Added PurchaseTransactionNotes_Update
1.3.6.0 1. Update to .NET Framework 4 (must be installed on server)
2. Updated TransactionUpdate methods to support write back to post transactions using
new section on the template files.
3. New method to reprint copy invoices, SQL scripts need to be applied to the database
with the script installer utility. Crystal MSI must be installed on Server.