Tag: ctapi

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 add and edit SOAddress records in SL using Catalina’s API for Dynamics SL

How to add and edit SOAddress records in SL using Catalina’s API for Dynamics SL

Here is an example of how you can create a NEW shipto address, using POST, for a customer (NOTE:  I am doing a post and not passing a ShipToId in the URL.)

Also NOTE:  When doing a post (adding a NEW address), if you explicitly set a ShipToId in the body, it cant be an existing ShipToId for that customer or an error will be thrown.  If you do pass a ShipToId in the body, the system will try to create a new ShipTo Address using that ShipToId.  If you don’t pass a ShipToId, the API will auto generate a new ShipToId for you.

Another NOTE:  There is an issue with the API, where you need to make sure that you put the CustId in the body, when doing a POST for a new ShipTo Address, or it wont save against the CustId.  This is a known issue where the API doesn’t grab the CustId from the query string when it is saving the SOAddress, it grabs from the body.  So, make sure that you are putting CustId in the body (also NOTE the capitalization of CustId. Darn Solomon in its differences in capitalization throughout.)

Creating a new SOAddress for a customer:

Here is an example of how to create a new SOAddress using curl and the action type of POST.  Variables that are in the call:

  • yourserver:  You would replace the actual server you have the Catalina API installed on instead of using “yourserver.”  this is just a placeholder.
  • YOURAUTHCODEHERE:  This should be the encoded basic authentication string for your setup
  • YOURCPNYID:  This should be the CpnyID of the Company you are using from your System database
  • YOURSITEIDHERE:  This should be the SiteID setup in the API configuration
  • CUSTID1:  This is a customer ID (CustID) that I am using in my example.  You would of course use a valid CustID in your SL’s Customer table
  • ADDR1:  I am forcing this to save a new ShipTo Address with the ShipToId of “ADDR1”.  If ADDR1 already exists for this customer, it will throw an error.  NOTE:  You can leave this field out and the API will auto-generate an ID for you
  • Other fields in the body is data that I wanted to save in the SOAddress
Curl -x post \
http://yourserver/ctdynamicssl/api/financial/accountsreceivable/customer/c300/address \
-H 'accept: application/json' \
-H 'authorization: Basic YOURAUTHCODEHERE' \
-H 'Content-Type: application/json' \
-H 'CpnyID: YOURCPNYIDHERE' \
-H 'SiteID: YOURSITEIDHERE' \
-H 'cache-control: no-cache' \
-d '{
"CustId": "CUSTID1",
"ShipToId": "ADDR1",
"Notes": "TEST",
"resultCode": 0,
"Addr1": "222 Smith Street",
"Addr2": "#18",
"Attn": "Marvin"
}'

Updating an existing SOAddress record

Now, lets say you want to edit an existing shipto address.  You would do a patch and make sure that you pass the ShipToId that you want in the URL.  It doesn’t have to be in the body.  In the below example, I am updating the ShipToId of ADDR1 for Customer ID CUSTID1 and only updating the field “Attn” to read “Marvin the Martian.”  PATCH will not update any other fields if they aren’t passed.

Curl -X PATCH \
http://yourserver/ctDynamicsSL/api/financial/accountsReceivable/customer/CUSTID1/address/ADDR1 \
-h 'accept: application/json' \
-h 'authorization: Basic YOURAUTHCODEHERE' \
-H 'Content-Type: application/json' \
-H 'CpnyID: YOURCPNYIDHERE' \
-H 'SiteID: YOURSITEIDHERE' \
-H 'cache-control: no-cache' \
-d '{
"CustId": "CUSTID1",
"Attn": "Marvin the Martian"
}'
How to call a custom SQL call using the Catalina API for Dynamics SL

How to call a custom SQL call using the Catalina API for Dynamics SL

How many times have you wanted to just make a SQL call from an app, website, or other system, but you don’t have direct access to a SQL connection or other easy method to call SQL?

Well the Catalina API for Dynamics SL has a secure way for you to make SQL calls over to your SL database using the Catalina common.asmx web service call.

Below is a quick tutorial on how to do this using .NET and the Catalina API for Dynamics SL (SOAP calls) Continue reading “How to call a custom SQL call using the Catalina API for Dynamics SL”

CTAPI – DEFAULTS & VALIDATIONS

CTAPI – DEFAULTS & VALIDATIONS

Catalina Technologies API for Dynamics SL allows you to create your own custom defaults and validations when sending data into SL through the API.

How to set Custom Defaults and Validations for web services in CTAPI. As of RELEASE builds post 2017/1/1, you are now able to overwrite defaults and validations in two single files. This is now the preferred place to make customizations, as it will avoid overwriting changes with new release builds of CTAPI.

The file for Defaults customizations is named: custom.default.ctDynamicsSL.xml and is located in your DEFAULTCONFIGDIRECTORY. (Path defined in your DSLCONFIGFILE, default: c:\inetpub\xctFiles\config\)
The file for Validations customizations is named: custom.validate.ctDynamicsSL.xml and is located in your VALIDATIONCONFIGDIRECTORY. (Path defined in your DSLCONFIGFILE, default: c:\inetpub\xctFiles\config\)
All customizations for defaults and validations for all CTAPI web services are contained in these two files.
Definition of the custom.default.ctDynamicsSL.xml file:

capture1

ID: (The field to set)
1. inItem – Always used to represent the Table/Object being defaulted. (not the field)
DEFAULTTYPE: (TEXT, PROC, CODE)
1. TEXT – sets the field value to the value listed in this xml element.
2 PROC – sets the field value to the value returned by the stored procedure listed in the xml element value. (optional: PARMS attribute listing stored procedure parameters)
3. CODE – sets the field value to the value returned by performing an eval on the code listed in the xml element value.

PARMS: (An optional, comma-delimitated list of parameters used for PROC Type defaults)
1. Variables from the inItem object that match stored procedure variable names.
e.g.: PARMS=’inItem.Status’
2. Rename an inItem object variable to a different stored procedure variable name.
e.g.: PARMS=’VendStatus=inItem.Status’
3. Hardcoded Stored procedure variable values.
e.g.: PARMS=’Active=1’

Definition of the custom.validate.ctDynamicsSL.xml file:

capture2

ID: (The field to set)
1. inItem – Always used to represent the Table/Object being defaulted. (not the field)
VALIDATETYPE: (LIST, PROC, NUMBERRANGE, DATERANGE, CODE)
1. LIST – a comma delimitated list of text values that are valid.
2. PROC – validates based on returnValue returned by the stored procedure listed in the xml element value. (optional: PARMS attribute listing stored procedure parameters)
3. NUMBERRANGE – a comma delimitated range of doubles.
e.g.: 1,5
4. DATERANGE – a comma delimitated range of dates.
e.g.: 1/1/2016,1/1/2019
5. CODE – validates the Boolean returned by performing an eval on the code listed in the xml element value.

PARMS: (An optional, comma-delimitated list of parameters used for PROC Type validations)
6. Variables from the inItem object that match stored procedure variable names.
e.g.: PARMS=’inItem.Status’
7. Rename an inItem object variable to a different stored procedure variable name.
e.g.: PARMS=’VendStatus=inItem.Status’
8. Hardcoded Stored procedure variable values.
e.g.: PARMS=’Active=1’

Introduction to CTAPI screen() Object

Most of the CTAPI Web Services are modeled after a counterpart SL client screen and intended to replicate its functionality.

The class path of these services matches the hierarchy and path to the screen in SL:

e.g.: ctDynamicsSL.financial.accountsPayable.maintenance.vendorMaintenance

screenmodel1-002

About the screen() object:

With this model in mind, all such services have a screen() object designed to match the schema of the comparable SL screen. E.g., In the Vendor Maintenance (03.270.00) SL screen, there is one SQL table referenced for reading and editing (Vendor).  This is represented by the myVendor variable of type ctDynamicsSL.Vendor inside the screen.  Also included is one read-only calculated object myBalances of type ctDynamicsSL.AP_Balances.

screenmodel2

Note: All object/table names and property/field names will match for both capitalization and naming.

Check mark.pngPro-tip: If you need to know which field to populate in the SL screen() objects, you only need to pull up Customization Mode in SL (Ctrl + Alt + C), locate the field and its name in the Property Window (F4), then find the FieldName. This FieldName correlates directly to a Table.Field and Object.Property in the screen() object.

e.g.: The following SL screen field correlates to:

ctDynamicsSL.financial.accountsPayable.maintenance.vendorMaintenance.screen.myVendor.Name

screenmodel3

In addition to the SL fields, all objects contain: public String errorMessage.

The errorMessage field defaults to a blank String “” and if populated, means that the system ran into an error during processing.

Note: when editing a screen object, any errors editing contained objects will bubble up to the screen level so it is only necessary to check the top object. 

 e.g.: if (!String.IsNullOrWhiteSpace(myScreen.errorMessage)){/*we ran into an error*/}

 Populating a screen object with defaults:

Every web service with a screen() object contains a public screen getNewscreen(screen inTemplate) call. This call will take the passed screen() object and return a copy with all default fields populated/overwritten.

Note: you can pass a null to get a completely new defaulted object.

e.g.: var myScreen = myVendorsService.getNewscreen(null);

Check mark.pngPro-tip: Some defaulted fields require other fields to be populated in order to get the right default value. E.g., CpnyID and CustID are common such fields; so it is recommend that you populate all non-defaulting fields before calling getNewscreen().

e.g.:
var myScreen = new ctDynamicsSL.financial.accountsReceivable.input.invoiceAndMemo.screen();
myScreen.myBatch = new ctDynamicsSL.financial.accountsReceivable.input.invoiceAndMemo.Batch();
myScreen.myBatch.CpnyID = “0060”;
myScreen = myIMObj.getNewscreen(myScreen); //loads defaults that depend on CpnyID

editScreen:

Every web service with a screen() object contains a public screen editScreen(String actionType, screen inScreen) call. This call is the workhouse used for Validations, Adding, Updating, or Deleting data.

The actionType parameter is standardized with:  VALIDATEONLY, ADD, UPDATE, or DELETE.

Note: you can leave actionType blank “” and the system will default to ADD if the primary keys do not already exist in the table, or UPDATE if they do. For best practices, always specify ADD or UPDATE.

e.g.:
//validate all my data before attempting to save:
var validateScreen = myVendorsService.editScreen(“VALIDATEONLY”, myScreen);
if (!String.IsNullOrWhiteSpace(validateScreen.errorMessage))
{
MessageBox.Show(“Error: ” + validateScreen.errorMessage);
return;
}

//add our new vendor entry
var add = myVendorsService.editScreen(“ADD”, myScreen);
if (!String.IsNullOrWhiteSpace(add.errorMessage))
{
MessageBox.Show(“Error: ” + add.errorMessage);
return;
}
else
{

//added our vendor, lets get the auto generated VendId
tbVendID.Text = add.myVendor.VendId.Trim();
}

//save our vendor screen updates
var update = myVendorsService.editScreen(“UPDATE”, myScreen);
if (!String.IsNullOrWhiteSpace(update.errorMessage))
{
MessageBox.Show(“Error: ” + update.errorMessage);
}
else
{
MessageBox.Show(“Save complete!”);
}

Posting Dynamics SL API examples to GitHub

Posting Dynamics SL API examples to GitHub

We are now posting our Catalina API for Dynamics SL sample client code to GitHub(under a MIT license.  Which means that you can use the sample client code for your own purposes).

I am posting the SOAP based sample clients here: https://github.com/CatalinaTechnology/ctAPIClientExamples

I just put up one for customer maintenance.  I will be posting more throughout the week (as I get them ready for consumption).  If you have any questions, feel free to Contact us.  Also, if you are a current Catalina API for Dynamics SL user and have any sample code that you would like to share with others, feel free to forward and we will see if we can get it out there for you.

List of SL Web Services in CTAPI

List of SL Web Services in CTAPI

We have been busy creating Web Services (API calls) that can simulate many of the popular screens and modules in Dynamics SL.  This makes it easier for programmers to communicate with the SL users to determine what integration points are needed.  This is also a great way to see how a user would normally use an SL screen manually.  That process can then be used a use case for the integration.

Below is a list (ever growing list) of the main screens that we have created an API equivalent to, to allow programmers, ETL (export/transform/load type software like scribe, cast iron, etc.), and apps to integrate to Dynamics SL.

If you don’t see something here, feel free to contact sales@catalinatechnology.com and we can always see about adding it. Continue reading “List of SL Web Services in CTAPI”