Month: February 2019

Catalina’s Ever Growing List of API’s for Dynamics SL

Catalina’s Ever Growing List of API’s for Dynamics SL

We at Catalina Technology are always growing our API for Dynamics SL. Below are just a few of the features included in our API suite for Dynamics SL. You can see this same list on our website here:

https://www.catalinatechnology.com/?CTAPI_LIST_OF_SL_SCREENS

List of API Functions as they Relate to SL Screens

ctDynamicsSL.administration.systemManager.security.userMaintenance

Comparable functionality to the SL screen (95.260.00)

ctDynamicsSL.email

Web service for sending emails using the Catalina Email Queueing and Templating API

ctDynamicsSL.fieldService.serviceContracts.maintenance.serviceContractEntry

Comparable functionality to the SL screen (SN.001.00)

ctDynamicsSL.fieldService.serviceDispatch.input.serviceCallEntry

Comparable functionality to the SL screen (SD.200.00)

ctDynamicsSL.fieldService.serviceDispatch.input.serviceCallInvoiceEntry

Comparable functionality to the SL screen (SD.202.00)

ctDynamicsSL.fieldService.serviceDispatch.maintenance.serviceEmployeeMaintenance

Comparable functionality to the SL screen (SD.007.00 and SD.007.01)

ctDynamicsSL.fieldService.serviceDispatch.maintenance.siteMaintenance

Comparable functionality to the SL screen (SD.025.00)

ctDynamicsSL.financial.accountsPayable.input.manualCheckPaymentEntry

Comparable functionality to the SL screen (03.030.00)

ctDynamicsSL.financial.accountsPayable.input.voucherAndAdjustmentEntry

Comparable functionality to the SL screen (03.010.00)

ctDynamicsSL.financial.accountsPayable.maintenance.vendorMaintenance

Comparable functionality to the SL screen (03.270.00)

ctDynamicsSL.financial.accountsReceivable.input.invoiceAndMemo

Comparable functionality to the SL screen (08.010.00)

ctDynamicsSL.financial.accountsReceivable.input.paymentApplication

Comparable functionality to the SL screen (08.030.00)

ctDynamicsSL.financial.accountsReceivable.input.paymentEntry

Comparable functionality to the SL screen (08.050.00)

ctDynamicsSL.financial.accountsReceivable.maintenance.customerMaintenance

Comparable functionality to the SL screen (08.260.00)

ctDynamicsSL.financial.accountsReceivable.maintenance.salesPersonMaintenance

Comparable functionality to the SL screen (08.310.00)

ctDynamicsSL.financial.eBankingSuite.maintenance.vendorBankingEntry

Requires 3rd party module: eBanking for Dynamics SL
http://www.sksoft.com/products/ebanking.php

ctDynamicsSL.financial.generalLedger.input.journalTransactions

Comparable functionality to the SL screen (01.010.00)

ctDynamicsSL.financial.payroll.maintenance.employeeMaintenance

Comparable functionality to the SL screen (02.250.00)

ctDynamicsSL.foundation.sharedInformation.maintenance.taxCategoryMaintenance

Comparable functionality to the SL screen (21.310.00)

ctDynamicsSL.foundation.sharedInformation.maintenance.taxGroupMaintenance

Comparable functionality to the SL screen (21.340.00)

ctDynamicsSL.foundation.sharedInformation.maintenance.taxMaintenance

Comparable functionality to the SL screen (21.280.00)

ctDynamicsSL.inventory.billOfMaterial.maintenance.billOfMaterialMaintenance

Comparable functionality to the SL screen (11.250.00)

ctDynamicsSL.inventory.billOfMaterial.maintenance.routingMaintenance

Comparable functionality to the SL screen (11.260.00)

ctDynamicsSL.inventory.inventory.input.inventoryIssues

Comparable functionality to the SL screen (10.020.00)

ctDynamicsSL.inventory.inventory.input.inventoryReceipts

Comparable functionality to the SL screen (10.010.00)

ctDynamicsSL.inventory.inventory.input.inventoryTransfers

Comparable functionality to the SL screen (10.040.00)

ctDynamicsSL.inventory.inventory.maintenance.inventoryItems

Comparable functionality to the SL screen (10.250.00)

ctDynamicsSL.inventory.inventory.maintenance.kits

Comparable functionality to the SL screen (10.320.00)

ctDynamicsSL.orderManagement.input.autoCharge

Requires 3rd party module: AutoCharge for Dynamics SL http://www.ehtc.com/AutoCharge

ctDynamicsSL.orderManagement.input.manifestEntry

Create, Read, Update, Delete functionality comparable to the manifestEntry screen (40.115.00)
Process Manager functionality not included.

ctDynamicsSL.orderManagement.input.shippers

Comparable functionality to the SL screen (40.110.00)

ctDynamicsSL.orderManagement.maintenance.customerContacts

Comparable functionality to the SL screen (08.260.00)

ctDynamicsSL.orders

Comparable functionality to the SL screen (40.100.00)

ctDynamicsSL.project.contractManagement.input.subContractPaymentRequestEntry

Comparable functionality to the SL screen (CN.SPR.00)

ctDynamicsSL.project.flexibleBillings.input.projectInvoiceAndAdjustmentMaintenance

Comparable functionality to the SL screen (BI.BAM.00)

ctDynamicsSL.project.projectBudgeting.input.budgetRevisionMaintenance

Comparable functionality to the SL screen (BU.BRM.00)

ctDynamicsSL.project.projectController.maintenance.projectEmployeeMaintenance

Comparable functionality to the SL screen (PA.EMP.00)

ctDynamicsSL.project.projectController.maintenance.projectMaintenance

Comparable functionality to the SL screen (PA.PRJ.00)

ctDynamicsSL.project.projectController.projectChargeEntry

Comparable functionality to the SL screen (PA.CHG.00)

ctDynamicsSL.project.timeAndExpense.input.projectTimecardWithRateAmtEntry

Comparable functionality to the SL screen (TM.TEA.00)

ctDynamicsSL.project.timeAndExpense.input.projectTravelAndExpenseEntry

Comparable functionality to the SL screen (TM.ENT.00)

ctDynamicsSL.project.timeAndExpense.maintenance.projectEmployeePositionRateMaintenance

Comparable functionality to the SL screen (TM.EPJ.00)

ctDynamicsSL.project.timeAndExpense.maintenance.projectExpenseTypeMaintenance

Comparable functionality to the SL screen (TM.ETM.00)

ctDynamicsSL.purchasing.inquiries.itemVendorHistory

Comparable functionality to the SL screen (04.310.00)

ctDynamicsSL.purchasing.inquiries.poReceiptsInquiry

Comparable functionality to the SL screen (04.200.00)

ctDynamicsSL.purchaseOrders

Comparable functionality to the SL screen (04.250.00)

ctDynamicsSL.queue

Service for queue functions for customization/integration purposes

ctDynamicsSL.quickQuery

Comparable functionality to the SL screen (QQ.VIE.00)

Advertisements

How to get a list of triggers

If you are like me, you spend a lot of time in Microsoft SQL Server. Often, a trigger can cause you a lot of grief. Whether it is a recursive trigger that goes into an endless loop. Or a trigger that is updating data in the recordset that you are trying to save (causing problems in your client code).

Here is a quick way to get a list of all triggers in a particular DB

SELECT 
     sysobjects.name AS trigger_name 
    ,USER_NAME(sysobjects.uid) AS trigger_owner 
    ,s.name AS table_schema 
    ,OBJECT_NAME(parent_obj) AS table_name 
    ,OBJECTPROPERTY( id, 'ExecIsUpdateTrigger') AS isupdate 
    ,OBJECTPROPERTY( id, 'ExecIsDeleteTrigger') AS isdelete 
    ,OBJECTPROPERTY( id, 'ExecIsInsertTrigger') AS isinsert 
    ,OBJECTPROPERTY( id, 'ExecIsAfterTrigger') AS isafter 
    ,OBJECTPROPERTY( id, 'ExecIsInsteadOfTrigger') AS isinsteadof 
    ,OBJECTPROPERTY(id, 'ExecIsTriggerDisabled') AS [disabled] 
FROM sysobjects WITH(NOLOCK)
INNER JOIN sys.tables t WITH(NOLOCK)
    ON sysobjects.parent_obj = t.object_id 
INNER JOIN sys.schemas s WITH(NOLOCK)
    ON t.schema_id = s.schema_id 
WHERE sysobjects.type = 'TR' 

You will get a result like this that will list out the triggers and which tables they are tied to.

Using ctAPI to Create Sales Orders

Using ctAPI to Create Sales Orders

We often get requests to integrate ecommerce or other systems to Dynamic SL’s Order Management module. Basically creating sales orders from shopping carts, CRM’s, Point of Sales, Mobile Apps, etc.

It is pretty easy to create sales orders in SL using Catalina’s API with a minimal amount of work. I am going to focus on the REST version of the API and show how you can create a sales order using Postman. From there, you can apply that to whatever client application you may be developing in.

The first thing that you do is look in Swagger to determine how to use the API. The swagger documentation, for the API, is located:

http://yourservername/ctDynamicsSL/swagger

Where “yourservername” is the server that the Catalina API is installed on.

NOTE:  ctDynamicsSL may be located in a different virtual path.  Check with your server administrator.

Below you can see an example of the swagger documentation. You will need to enter your API key and password, CpnyID, and SiteID in the top navigation bar if you want to use the swagger tools to test code. In this example, we are just getting the usage information on how to save an order.

Clicking on the Orders resource of the API you can then look at the POST method. This is the method that allows you to save new orders. It also gives you the format of the order object you would pass to the API.

Now you have this information, you now know how to send data to the API. Below is an example of one of the most simplest orders to create. There is very little required. You would replace the values with the values that match what your SL system accommodates.

{
	"SOTypeID":"SO",
	"ShipViaID":"BEST",
	"CustID":"C300",
	"ShipToID":"DEFAULT",
	"orderItems": [
        {
        	"InvtID":"0RCRANK",
        	"QtyOrd":1,
        	"CurySlsPrice":-999876,
        	"CuryCost":-999876,
        	"Taxable":1
        }
     ]

}

NOTE: notice the CurySlsPrice and CuryCost. If you put either of those to the secret number of -999876, this will tell the Catalina API to have Dynamics SL calculate the pricing. If you put any other number, your number will be what is saved in the line item as the price.

Here is how you can put it together in a curl code. This gives you the information on how to use the URL (NOTE: you will have to replace yourservername with your actual server) and change the authorization to what your authorization is setup on your server.

curl -X POST \
  http://yourservername/ctDynamicsSL/api/orders/sales/order \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic YOURAUTHORIZATIONHERE' \
  -H 'Content-Type: application/json' \
  -H 'CpnyID: 0060' \
  -H 'SiteID: DEFAULT' \
  -H 'cache-control: no-cache' \
  -d '{
	"SOTypeID":"SO",
	"ShipViaID":"BEST",
	"CustID":"C300",
	"ShipToID":"DEFAULT",
	"orderItems": [
        {
        	"InvtID":"0RCRANK",
        	"QtyOrd":1,
        	"CurySlsPrice":-999876,
        	"CuryCost":-999876,
        	"Taxable":1
        }
     ]

}'

And below, you can see how you can enter it into Postman. NOTE how the API passes back the order object to you once it is created. If there is an error, the order object will be passed back mostly blank with the field errorString as not empty (meaning the error will be stored in the field errorString)