Month: October 2017

Create your own incrementing scheme in SQL for Dynamics SL Order Line Items

Earlier today, I was asked if I could come up with a query that would allow you to bring back line items for a sales order.  But create a numbering scheme for the line items that re-start for each new order number.  So, example:

You can see below, that ORD1234 has 3 items, indexed 1,2,3.  and ORD5555 has 2 line items indexed 1,2

OrdNbr InvtID LineIndex
ORD1234 IN82344 1
ORD1234 IN82341 2
ORD1234 IN82344 3
ORD5555 IN089723 1
ORD5555 IN0123998 2

I accomplished this by using the DENSE_RANK().

Here is sample code:


SELECT DENSE_RANK() OVER (PARTITION BY OrdNbr ORDER BY OrdNbr, LineRef) * 10  AS LineIndex
, OrdNbr
, LineRef
, InvtID
, QtyOrd
FROM   SOLine
ORDER  BY OrdNbr, LineIndex

What I wanted to do in this was to show the order number, lineRef, invtID, and qtyOrd.  But I wanted to show the LineIndex in increments of 10 that restarted for every time the OrdNbr changed.  I have one of the orders that have multiple line items circled below.

sql

 

Advertisements

Read and Control IOT devices using SMS messaging

Over the weekend, I connected our home hydroponics system to Catalina Technologies SMS Central messaging system.  This system allows you to receive notifications from your sensors as well as even control devices just using SMS messaging.  No apps needed.  You can even control devices and get notifications from an old school flip phone.

Here is a video I took of doing simple control of lighting and hydroponics pumps just using SMS messaging.

SMS Central allows people in the field to send pictures and other attachments to Dynamics SL without any special app (Just SMS Messaging)

Catalina’s SMS Central allows you to easily dispatch your field techs, salespeople, and others straight from your Dynamics SL without any special mobile apps.  All using SMS messaging.  Nothing to deploy, works on any phone, and easy to maintain.

Your people in the field can send updates as replies that will get automatically updated in your back office.  They can even send pictures, GPS coordinates, and other attachments which will automatically be attached to the service call, quote, invoice, timecard, or any other screen in Dynamics SL.

1. Create a service call, quote, invoice, or any other type of record in Dynamics SL.  SMS Central will send an SMS message to the appropriate person in the field.

dispatch

2.  Your person in the field receives the message and can respond.  Those responses will automatically update Dynamics SL.Hand-Holding-Cell-Phone

 

3. The field person can also take pictures, GPS coordinates, or other mobile files and attach them to the service call, quote, invoice, or other screen in Dynamics SL using just an SMS message.

Picture-Cellphone

 

4. That photo, or other attachment, automatically attaches to the appropriate record in Dynamics SL

DynamicsSL Attachments

 

5. All attachments and SMS communication are also stored in a web portal, allowing your field people to review history without needing any special app.  Any browser on any type of device will work!

Webportal Images

Simple way to create an API to Azure Service Bus Queues

Most of the time, you have to write code that drops data into an Azure Service Bus Queue.  Catalina Technologies Integration Toolkit can simplify this process by allowing you to easily create a webhook that can read data, transform it, and then send it to any message queue you have a valid shared access key for.

The toolkit can also automate reading data from other API’s and then bridge that data to Azure Message Queues as well.  It is very customizable and configurable.

Below is a quick demo showing how you can create a webhook, assign security to it, and then transform received data before pushing it to an Azure Service Bus Queue.