It is simple to call a stored procedure through a RESTful API call if you have Catalina’s API for Dynamics SL. You can call any stored procedure and pass parameters and retrieve data.
This is a demo on how to call a stored procedure using Postman and Catalina’s API for Dynamics SL.
First, to do this demo, you need to download and install Postman. Postman is a developer tool that allows you to interact with API’s easily so that you can test API calls to see how you call them and what data is returned. You can get Postman here: https://www.postman.com/
In the demo, we are going to call the stored procedure SOHeader_all. This stored procedure retrieves all Sales Order Headers (SOHeader) for a particular CpnyID and OrdNbr. NOTE: this is just an example. With Catalina’s API, you can call any stored procedure.
SOHeader_all has 2 parameters: – @parm1: This parameter is for the CpnyID – @parm2: This parameter is for the OrdNbr (can use a wildcard like ‘O000%’ which will bring back all orders that start with O000.
You can see what the procedure looks like here:
@parm1 varchar( 10 ),
@parm2 varchar( 15 )
WHERE CpnyID = @parm1
AND OrdNbr LIKE @parm2
ORDER BY CpnyID,
So, if you wanted to retrieve all orders that started with “O000” for CpnyID = “0060” you would call the stored procedure like this:
exec SOHeader_all @parm1='0060', @parm2='O000%'
So, now how to call this using Postman through Catalina’s API for SL?
First you need to know where your Catalina API is installed. I am going to use the server name yourserver.com as the domain name. So, for this example, we would look at the endpoint as the following:
As you can see above, you would replace yourServer.com with wherever your server is. And you can see <ProcedureName> in the URL. this would be replaced with the actual stored procedure name you want to call (in this example, we are going to replace it with SOHeader_all). So, the new URL for the endpoint would look like the following:
In Postman, you would make it look like below. NOTE: when calling a customSQL stored procedure, you must use the action type of “POST”
Next, you need to set the authentication. This is done on the “Authorization” tab. Catalina’s API uses “Basic Auth”. So, make sure that you set the type for “Basic Auth” in the dropdown. And then enter the username and password that was given to you from your installer.
After that, you will have been given a SiteID from your installer. You will need to create a Header for that SiteID. You do this on the headers tab. You should enter that SiteID (in my example it is “DEFAULT”, but you would use the SiteID given to you by your installer) and the default CpnyID (in my example that is “0060”, but you would use your CpnyID of your database)
Finally, you will want to enter the body of the parameters that are being passed. There are 2 parameters for SOHeader_all (@parm1 and @parm2). The format of the body that you would set is below.
This is a demo that shows you how to create a mobile app to interact with Dynamics SL to provide a “Contact Free” payment solution to help protect your employees and customers during COVID 19. The intended user of this example app would be a customer service rep, sales person, or field service rep who needs to collect payment from a customer (handy for collecting a deposit or down payment before delivery, installation, or service work to be done).
This demo uses Catalina’s API to search customers in SL and then lets the user to request a payment from a customer by generating a link and emailing it to the chosen customer. That customer then can click on the link and pay the amount which automatically creates a payment in SL’s AR.
Check out the video of the demo on our Youtube channel here:
Below is a screenshot of the Android app from the above demo. First you can search for a customer by a keyword. That search will then bring back a list of results. You can then click on the customer you want to request funds for. The app will automatically fill in the email address of the customer (from the Customer record in Dynamics SL). You can change the email address if you want. You then enter a requested payment amount and hit submit. Once you do this, Catalina’s SLQuickPay will send off an email to the customer with a link which will then allow them to make a PCI compliant secure payment. Once authorization occurs, SLQuickPay will then create a payment in Dynamics SL automatically.
As mentioned below, if you want to have starter code on creating an Android App (with Visual Studio and Xamarin), you can check out an example on our Github here (NOTE: I would only consider this a starter. This is in no means something finished but enough to get you started)
I ran into an issue earlier where I was trying to retrieve a customer using the Catalina Technology API for Dynamics SL. But the problem was that the CustID had special characters in it. In this case, the CustID looked like this: “BB& 1 2“
So, there was a prefix of “BB”, then there was an ampersand, and then there were two spaces, then the number 1, two more spaces, then the number 2.
First of all, I had to URL encode the CustID that was getting passed to my API so that the call looked like this:
You can see that & was replaced by %26 and a space was replaced by %20.
Now, that is fine, but then .NET was having problems with the & (even encoded) in that it had an error like this:
A potentially dangerous Request.Path value was detected from the client (&).
This is remedied by looking at the web.config of your ctDynamicsSL application. Search for the keyword: httpRuntime. Once you found that, if you don’t already have an attribute requestPathInvalidCharacters in that key, add it. This is a good default one:
Having a Continuity of Operations Plan is very important for businesses to continue to perform essential functions under a broad range of circumstances. The term Continuity of Operations Plan (COOP) is mostly attributed to the Federal Government which mandates a plan to keep the government running when faced with different crisis (financial, war, terrorist attacks, natural disasters, even nuclear attacks).
In the business world, we hopefully don’t have to worry about things like nuclear attacks, but we still need to be prepared so that we can be operational when “disaster” strikes. This could be any number of things: loss of key personnel, data loss, hacker breach, regional natural disasters (hurricane, earthquake, etc.), or what we have today with a global pandemic that is forcing businesses to shut down offices, implement work at home orders, and reduction of staff.
When you have less support staff to do your day-to-day processing of AR, AP, and other tasks, it becomes difficult to get paid by your customers and pay your vendors. Utilizing automation can help reduce your risk of downtime during crisis times. And it can increase productivity when you aren’t operating in crisis mode.
In the Accounts Receivable realm, Catalina Technology has automation tools that allow businesses to create customer portals so that the customer can login, view their statements, pay invoices, apply credit memos, and other AR functionality. Account Central also allows your remote workers to login and manage their customers, send out invoices, and pay for their customers without having to be in the office.
Because Catalina’s tools are web based, your infrastructure needs are minimal. You don’t have to have complex VPN’s setup, access to terminal server, or the SL thick client. All the user needs is a web browser. Security also insures that payments captured are PCI compliant to protect your customer’s identity and payment information.
Catalina also has other integration tools that allow you to integrate with best of breed cloud based solutions for procurement, ecommerce, CRM, human resources, time tracking, and many more. This will allow you give your employees and customers access to cloud based tools and apps no matter where they are working. Catalina’s integration tools will then make sure that the data synchronizes between SL and cloud.
Regardless of what you do to plan for crisis, having a plan is important. Most businesses get caught off guard even from the smallest of emergencies. Creating a plan, understanding your weak points, and having ways to maintain operations during an emergency is very important. The federal government also has some pointers and planning ideas here on ready.gov: https://www.ready.gov/business-continuity-plan
Brian Wharton founded Catalina Technology (www.catalinatechnology.com) to extend enterprise systems to the web over 20 years ago. Catalina is a leader in integration and API development for ERP solutions.
Catalina Technology is a developer of an extremely comprehensive software API which enables the back office ERP to integrate to many 3rd party and custom solutions for CRM (Dynamics CRM and Salesforce), helpdesk and support, time and expense management, 3PL integration, EDI replacement, and more.
This is a video I did back in 2017 where I took a photo of a house key and 3D printed it and it actually worked. NOTE: This key wasn’t the strongest of keys. And only worked a few times. But it is only needed once to make it a bad day for a home owner. Beware when you post pictures that include your keys in them.
If you are looking to build a cross platform application in .NET Core that can access Dynamics SL, you can use Catalina’s API for Dynamics SL. This is a demo on how you can do it using Visual Studio and deploy the client to Windows, Mac, and/or Linux (or any OS that supports .NET Core).
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:
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.