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.


Create Sales Orders with ctAPI

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)



New Location, New Garden

We recently decided to move from California to the Outer Banks of North Carolina.  The reasons are many (taxes, crowds, etc.), but what we are going to miss is the year around growing season we had in Southern California.  Even though we had such a small garden, the use of vertical hydroponics, rain gutter growing, raised beds, etc. allowed us to have a very productive garden that produced most of our greens and herbs.

This new location is going to be very different.  We do have a lot more land.  But, it is on a barrier island where the soil is mostly sand, isn’t very fertile for growing food, very salty, and there can be severe storms. Continue Reading


URL’s for PayFabric and Catalina’s Payment Processing

PayFabric has several different endpoints depending on which version you are using.  When configuring Order Central, Account Central, or Sales Central, use the following endpoints based on the version you are setup to use:

LIVE V3
https://www.payfabric.com/Payment/API
https://www.payfabric.com/Payment/Web

LIVE V2:
https://www.payfabric.com/V2/Rest
https://www.payfabric.com/V2/web

TEST V3
https://sandbox.payfabric.com/Payment/API
https://sandbox.payfabric.com/Payment/Web

TEST V2:
https://sandbox.payfabric.com/V2/Rest
https://sandbox.payfabric.com/V2/web


TSheets Integration for Dynamics SL

 

Catalina creates seamless integration with TSheets and Dynamics SL.  This removes the tedious re-keying of data that introduces costly errors and additional resources.  The key Integration points are:

  • Synchronize Projects and Tasks between Dynamics SL and TSheets
  • Synchronize Employees between Dynamics SL and TSheets
  • Synchronize timecard entries between Dynamics SL and TSheets

This allows you to use a best of breed time tracking and approval software like TSheets.  And then be able to synchronize time back into Dynamics SL so that you can pay your employees and bill your customers.


Give your customers access to product documentation through SMS Texting (no app or website needed)

Quick demo I did on our SMS Central product to allow your customers to download product documentation to their phone by just texting a picture of a barcode on the product.

Give your customer quick access to product, safety, and other documentation without an app or website.  Your customer can just text a picture of a product barcode from their phone (no app needed).  SMS Central will then text the document back to your customer’s phone based on that barcode.  You can store your documents in SharePoint, OneDrive, DropBox, a file server, a document imaging system (like Metafile or Papersave), or most any other location.  SMS Central will decode the barcode and retrieve the proper image and send to your customer or field personnel.


Allow your customers to retrieve product documents by simply SMS texting a picture of a barcode from the product

Getting product documents to your customers and your field technicians is always difficult.  SMS Central makes it easier.  Your customer or field personnel only needs to take a picture of a barcode on the product and SMS text it through SMS Central, which will look up the proper document and text it back.  No app is needed, no website, no jotting down of serial numbers and then running to a computer to google.  Just simply text a picture and get the document.

You can link any type of barcode to a document.  Whether it is a manufacturer’s barcode or you have your own barcode standards.  We just link that barcode to a document and when a customer or field person texts a picture of a matching barcode or QR code, we lookup the appropriate document and send it back to them.

Documents can be stored in SharePoint, SQL Server, Azure Storage, Web, or we can store it for you in our cloud storage.


SMS and Barcodes make for quick and easy communication to your ERP, Helpdesk, Field Service, or other system

SMS Central provides you with a way for customers and employees to quickly communicate information stored on barcodes directly back to your back-office systems by doing nothing more than taking a picture of the barcode and texting it.  You don’t need any app installed on a phone other than SMS messaging.  Those barcodes can then be used to create sales orders, service calls, inventory changes, as well as countless other things that you can use when tagging an item with a bar or QR Code.

Barcode formats SMS Central can handle

UPC-A, UPC-E, EAN-8, EAN-13, Code 39, Code 93, Code 128, ITF, Codabar, MSI, RSS-14, QR Code, Data Matrix, Aztec, PDF-417 

For Customers

Wouldn’t it be great if you could communicate information with high accuracy between you and your customers?  What if your customer has a problem with one of your products and you are trying to determine exactly which one it is?

SMS Central allows you to give your customer a phone number to SMS text to and mail a QR or barcode directly to your system already decoded!

All a customer has to do is take a picture of the barcode on their product and SMS message it to you.  They don’t have to install any special app on their phone and it will work on any phone.  SMS Central will then automatically decode that barcode and can then save it directly into your ERP, helpdesk, field service, CRM, or any other system so that you can have that information at your fingertips. 

For Sales

If you have sales people out in the field needing to restock shelves, supply restaurants, or other situation where the sales rep can snap a picture of the barcode on a product, SMS text it to your order management system, and then get it ordered.  All without any app installed on their phone.

Just snap a picture of a barcode of a product and send it to your order management or other system!

There are countless ways that SMS Central could be configured to handle most any workflow or need.

For Field Service, Inventory, and Asset Management

Your people in the field can quickly snap shots of barcodes and QR codes at customer sites to track what equipment is on site, what hardware has problems, or take inventory of assets at a location by simply using any phone and taking a picture and texting it.

Getting information about an asset or tracking assets is as easy as taking a picture of a barcode and sending it to your back-office system.  SMS Central does the rest!