Automation Commands
These are the Automation Commands we will use. Only 1 of them has a Mapping.
These are the Automation Commands we will use. Only 1 of them has a Mapping.
@@LoadEntityVariables
declare @entityType varchar(255) = 'Customers'
declare @entityId int = 0
declare @entityName varchar(255) = ''
declare @accountId int = 0
declare @accountName varchar(255) = ''
declare @zeroBalanceDate datetime = '2000-01-01T00:00:00.000'
declare @zeroBalanceDatecheck datetime = '2000-01-01T00:00:00.000'
SET @entityId = (SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='AS Entity Id')
SET @entityName = (SELECT [Name] FROM [Entities] WHERE [Id]=@entityId)
SET @accountId = (SELECT [AccountId] FROM [Entities] WHERE [Id]=@entityId)
SET @accountName = (SELECT [Name] FROM [Accounts] WHERE [Id]=@accountId)
UPDATE [ProgramSettingValues] SET [Value]=@entityName WHERE [Name]='AS Entity Name'
UPDATE [ProgramSettingValues] SET [Value]=@accountId WHERE [Name]='AS Account Id'
UPDATE [ProgramSettingValues] SET [Value]=@accountName WHERE [Name]='AS Account Name'
SET @zeroBalanceDatecheck =
(
select max(date) from
(select date,sum(debit-credit) over (order by date) as balance
from AccountTransactionValues
where AccountId = @accountId) sub
where balance = 0
)
IF (@zeroBalanceDatecheck > @zeroBalanceDate) SET @zeroBalanceDate = @zeroBalanceDatecheck
UPDATE [ProgramSettingValues] SET [Value]=convert(varchar(30),@zeroBalanceDate,126) WHERE [Name]='AS Entity Date_ZeroBalance'
@@GetStatement
declare @entityType varchar(255) = 'Customers'
declare @entityId int = 0
declare @dateFilterBeg datetime = GETDATE()
declare @entName varchar(255) = '@1'
declare @entId int = 0
SET @dateFilterBeg = (SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='AS Date Filter Beg')
SET @entId = (SELECT isnull([Id],0) FROM [Entities] WHERE [Name]=@entName)
IF @dateFilterBeg = ''
BEGIN
SET @dateFilterBeg = '2000-01-01'
END
SET @entityId = (SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='AS Entity Id')
IF @entId > 0 SET @entityId = @entId
declare @txcount int = 0
declare @i int = 1
declare @balance decimal(7,2) = 0.00
declare @lastZeroDate varchar(50) = '2000-01-01'
declare @tbl_tx_all table (
[Id] INT IDENTITY(1,1) NOT NULL
, [TxDate] Datetime null
, [TicketId] int null
, [TicketNo] int null
, [Description] varchar(255) null
, [Amount] decimal(6,2) null
, [Balance] decimal(7,2) null
)
declare @tbl_tx_filtered table (
[Id] INT IDENTITY(1,1) NOT NULL
, [TxDate] Datetime null
, [TicketId] int null
, [TicketNo] int null
, [Description] varchar(255) null
, [Amount] decimal(6,2) null
, [Balance] decimal(7,2) null
)
INSERT INTO @tbl_tx_all ([TxDate], [TicketId], [TicketNo], [Description], [Amount], [Balance])
SELECT
tv.[Date] as [Date]
,tkt.[Id] as [TicketId]
,CASE
WHEN tkt.[TicketNumber]>0 Then tkt.[TicketNumber]
ELSE d.[Id]
END as [TicketNo]
,CASE
WHEN [Credit] > 0 Then 'Payment [' + d.[Name] + '] ' + tx.[Name]
WHEN [Debit] > 0 Then 'Purchase'
END as [Desc]
,[Debit]-[Credit] as [Amount]
,0 as [Balance]
FROM [AccountTransactionValues] tv
LEFT JOIN [AccountTransactions] tx on tx.[Id] = tv.[AccountTransactionId]
LEFT JOIN [AccountTransactionDocuments] d on d.[Id] = tv.[AccountTransactionDocumentId]
LEFT JOIN [AccountTransactionTypes] tt on tt.[Id] = tv.[AccountTransactionTypeId]
-- Accounts
LEFT JOIN [AccountTypes] at on at.[Id] = tv.[AccountTypeId]
LEFT JOIN [Accounts] a on a.[Id] = tv.[AccountId]
-- Ticket
LEFT JOIN [Tickets] tkt on tkt.[TransactionDocument_Id] = d.[Id]
LEFT JOIN [TicketEntities] te on te.Ticket_Id = tkt.[Id] and te.[EntityTypeId] IN (SELECT [Id] FROM [EntityTypes] WHERE [Name]=@entityType)
-- Entity
LEFT JOIN [Entities] e on e.[Id] = te.[EntityId]
LEFT JOIN [EntityTypes] et on et.[Id] = e.[EntityTypeId]
WHERE 1=1
--AND tv.[AccountId] in (SELECT TOP 1 [AccountId] FROM [Entities] WHERE [Name] = @entityName)
AND tv.[AccountId] in (SELECT TOP 1 [AccountId] FROM [Entities] WHERE [Id] = @entityId)
ORDER BY [Date] ASC
-- get count of records
SELECT @txcount = count([Id]) FROM @tbl_tx_all
-- loop all records to set Last 0 Balance Date
WHILE @i<=@txcount
BEGIN
SET @balance = @balance + (SELECT [Amount] FROM @tbl_tx_all WHERE [Id]=@i)
UPDATE @tbl_tx_all SET [Balance] = @balance WHERE [Id]=@i
--IF @balance = 0 UPDATE [ProgramSettingValues] SET [Value]=(SELECT [TxDate] FROM @tbl_tx_filtered WHERE [Id]=@i) WHERE [Name]='AS Entity Date_ZeroBalance'
IF @balance = 0 SET @lastZeroDate = replace((SELECT convert(varchar(50),[TxDate],126) FROM @tbl_tx_all WHERE [Id]=@i),'T',' ')
SET @i = @i + 1
END
UPDATE [ProgramSettingValues] SET [Value]=@lastZeroDate WHERE [Name]='AS Entity Date_ZeroBalance'
--SELECT isnull(max([TxDate]),'2000-01-01') FROM @tbl_tx_all WHERE [Balance] = 0.00
--print '------------------------------------------- ' + @lastZeroDate
-- loop filtered records to get Balance Brought Forward previous to @dateFilterBeg
SET @balance = 0.00
SET @i = 1
WHILE @i<=@txcount
BEGIN
IF @dateFilterBeg > (SELECT [TxDate] FROM @tbl_tx_all WHERE [Id]=@i)
BEGIN
SET @balance = @balance + (SELECT [Amount] FROM @tbl_tx_all WHERE [Id]=@i)
UPDATE @tbl_tx_all SET [Balance] = @balance WHERE [Id]=@i
END
SET @i = @i + 1
END
-- insert Balance Brought Forward
IF @dateFilterBeg > (SELECT MIN([TxDate]) FROM @tbl_tx_all)
BEGIN
INSERT INTO @tbl_tx_filtered ([TxDate], [TicketId], [TicketNo], [Description], [Amount], [Balance])
SELECT @dateFilterBeg, 0, 0, 'Balance Brought Forward', @balance, @balance
END
-- insert Filtered Transactions
INSERT INTO @tbl_tx_filtered ([TxDate], [TicketId], [TicketNo], [Description], [Amount], [Balance])
SELECT [TxDate], [TicketId], [TicketNo], [Description], [Amount], [Balance] FROM @tbl_tx_all WHERE [TxDate] >= @dateFilterBeg
-- loop records to use filtered amounts and Balance Brought Forward
SELECT @txcount = count([Id]) FROM @tbl_tx_filtered
SET @i=1
SET @balance = 0.00
WHILE @i<=@txcount
BEGIN
SET @balance = @balance + (SELECT [Amount] FROM @tbl_tx_filtered WHERE [Id]=@i)
UPDATE @tbl_tx_filtered SET [Balance] = @balance WHERE [Id]=@i
SET @i = @i + 1
END
select [TxDate], [TicketId], [TicketNo], [Description], [Amount], [Balance] from @tbl_tx_filtered ORDER BY [Id] DESC
db.ExecStoredScript()
and db.getRow()
function ExecStoredScript(script) {
var r = sql.Exec(script);
return r;
}
function getRow(sqlcmd) {
var r = sql.Query(sqlcmd).First;
return r;
}
pay.UpdateDescription()
function UpdateDescription(creditPayment) {
creditPayment = typeof creditPayment !== 'undefined' ? creditPayment : '';
creditPayment = creditPayment.replace('Customer ','');
creditPayment = creditPayment.replace(' Payment','');
var dt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
var paymenttype = Data.Get("paymentTypeName");
var paymentinfo = dt + " [" + paymenttype + "]";
var cctype='';
var ccdigits='';
if (paymenttype=='Credit Card' || paymenttype=='Credit Card USD' || creditPayment=='Credit Card' || creditPayment=='Credit Card USD') {
cctype = dlg.AskQuestion("Choose Credit Card type","Amex=AMEX,Master Card=MAST,Visa=VISA,Discover=DISC,Other=OTHR,CANCEL=CANCEL");
if (cctype=="CANCEL") {
Data.Set("canContinue",false);
dlg.ShowMessage("Payment Cancelled");
return 1;
}
ccdigits = dlg.EditValue("Last 4 CC Digits;.{4};;ON","");
paymentinfo += " (" + cctype + " " + ccdigits + ")";
}
creditPayment = (creditPayment != '' ? dt + ' [' + creditPayment + ']' : '');
if (cctype!='') {
creditPayment = (creditPayment!='' ? creditPayment + ' (' + cctype + ' ' + ccdigits + ')' : '');
}
if (paymenttype=='Customer Account' || paymenttype=='Gift Certificate') {
var accountname = Data.Get("accountName");
paymentinfo += " (" + accountname + ")";
}
Data.Set("description", paymentinfo);
//dlg.ShowMessage("Payment Processed\r"+paymentinfo);
if (creditPayment != '') {
return creditPayment;
} else {
return paymentinfo;
}
}
[#Account Statement:2, 1, 1, 1, 1, 1]
>Date| TID| TNo/Doc| Description| Amount| Balance
@@GetStatement
[ENTITY]
<T>ACCOUNT STATEMENT
<J00>Customer: {ENTITY NAME}|Account: {ACCOUNT NAME}
<J00>Tx Since: {SETTING:AS Date Filter Beg}|Balance: {ENTITY BALANCE}
<F>=
<J00>Date| TID| TNo| Description| Amount| Balance
<F>-
{REPORT SQL DETAILS:@@GetStatement:
F.TxDate.desc,F.TicketId,F.TicketNo,F.Description,F.Amount,F.Balance::
<J00>{0}| {1}| {2}| {3}| {4}| {5}
}
<F>=
We need to use quite a few Actions to give us full Custom functionality.
AS Add Order - ACCOUNT PAYMENT
Action Name: | AS Add Order - ACCOUNT PAYMENT |
Action Type: | Add Order |
Menu Item Name: | ACCOUNT PAYMENT |
Portion Name: | |
Quantity: | |
Tag: | |
Order State Name: | |
Order State: | |
Price: | |
Increase Inventory: | |
Decrease Inventory: | |
Locked: | |
Calculate Price: | |
Can Create Ticket: | True |
AS Ask Question
Action Name: | AS Ask Question |
Action Type: | Ask Question |
Question: | [:question] |
Buttons: | [:buttons] |
Automation Command Name: | [:AMCname] |
Background Color: | [:BGcolor] |
Transparent Color: | [:TPcolor] |
AS Change Ticket Entity
Action Name: | AS Change Ticket Entity |
Action Type: | Change Ticket Entity |
Can Create Ticket: | True |
Can Create Entity: | |
Entity Type Name: | Customers |
Entity Name: | [:EntityName] |
Entity Search Value: | |
Update Null Entity: | |
Entity Screen Name: | |
Entity Screen Search Value: | |
AS Change Ticket Type
Action Name: | AS Change Ticket Type |
Action Type: | Change Ticket Properties |
Ticket Type Name: | Account Payment Ticket |
Is Pre Order: | False |
Change Ticket Date: | False |
AS Create Tx Doc
Action Name: | AS Create Tx Doc |
Action Type: | Create Account Transaction Document |
Account Transaction Document Name: | [:DocName] |
Account Name: | [:AccountName] |
Account Id: | [:AccountId] |
Date: | [:date] |
Description: | [:Description] |
Amount: | [:Amount] |
AS Display Payment Screen
Action Name: | AS Display Payment Screen |
Action Type: | Display Payment Screen |
Balance Mode: | [:BalanceMode] |
AS ExecAMC
Action Name: | AS ExecAMC |
Action Type: | Execute Automation Command |
Automation Command Name: | [:AMCname] |
Command Value: | [:AMCvalue] |
Background: | [:BGcolor] |
Delay: | [:delay] |
AS ExecScript
Action Name: | AS ExecScript |
Action Type: | Execute Script |
Function: | [:func] |
Command: | [:command] |
Run In Background: | False |
AS Load Entity
Action Name: | AS Load Entity |
Action Type: | Load Enitiy |
Entity Type Name: | Customers |
Entity Name: | [:entityName] |
Entity Search Value: | |
AS Load Ticket
Action Name: | AS Load Ticket |
Action Type: | Load Ticket |
Ticket Id: | [:ticketId] |
Tag Name: | |
Tag Value: | |
State Name: | |
State: | |
AS Navigate
Action Name: | AS Navigate |
Action Type: | Navigate Module |
Module Name: | [:module] |
Parameter: | [:parm] |
Hide Header: | [:hideHeader] |
AS Print Account Statement
Action Name: | AS Print Account Statement |
Action Type: | Print Entity |
Entity Id: | [:EntityId] |
Entity Name: | |
Printer Name: | Account Printer |
Printer Template Name: | Account Statement |
AS Update Entity Data
Action Name: | AS Update Entity Data |
Action Type: | Update Entity Data |
Entity Type Name: | Customers |
Entity Name: | [:entityName] |
Field Name: | [:fieldName] |
Field Value: | [:fieldValue] |
AS Store Value
Action Name: | AS Store Value |
Action Type: | Update Program Setting |
Setting Name: | [:settingName] |
Setting Value: | [:settingValue] |
Update Type: | Update |
Is Local: | False |
Our Rule set to handle everything …
AS Store Account Balance
Rule Name: | AS Store Account Balance |
Event Name: | Ticket Entity Changed |
Execute Rule if: | Matches |
Entity Type Name | Equal | Customers |
Constraint:
settingName: | AS Entity Name |
settingValue: | {ENTITY NAME:Customers} |
Constraint:
settingName: | AS Entity Balance |
settingValue: | [=TN('{ENTITY BALANCE:Customers}') > 0 ? TN('{ENTITY BALANCE:Customers}') : 0] |
AS Order Added - Change Ticket Type
Rule Name: | AS Order Added - Change Ticket Type |
Event Name: | Order Added |
Execute Rule if: | Matches |
Menu Item Name | Equal | ACCOUNT PAYMENT |
Constraint:
AS Pay Account - Payment Screen
Rule Name: | AS Pay Account - Payment Screen |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Pay Account |
{SETTING:AS Entity Balance} | Greater | 0 |
Constraint:
Constraint:
EntityName: | {SETTING:AS Entity Name} |
Constraint:
BalanceMode: | True |
AS Account Operations
Rule Name: | AS Account Operations |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Account Operations |
{ENTITY ACCOUNT NAME: Customers} | Is Not Null |
|
Constraint:
Constraint:
settingName: | AS Entity Id |
settingValue: | {CALL:db.getRow("SELECT Id FROM Entities WHERE Name='{ENTITY NAME:Customers}'")} |
Constraint:
AMCname: | AS Load Account Statement |
AMCvalue: | {SETTING:AS Entity Id} |
BGcolor: | |
delay: | |
AS Show Account Screen
Rule Name: | AS Show Account Screen |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Show Account Screen |
Constraint:
module: | Accounts |
parm: | Customer Accounts |
hideHeader: | True |
AS Set Statement Variables
Rule Name: | AS Set Statement Variables |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Set Statement Variables |
Constraint:
settingName: | AS Entity Id |
settingValue: | [=TN('[:CommandValue]')] |
Constraint:
settingName: | AS Entity Name |
settingValue: | |
Constraint:
settingName: | AS Account Id |
settingValue: | 0 |
Constraint:
settingName: | AS Account Name |
settingValue: | |
Constraint:
settingName: | AS Date Filter Beg |
settingValue: | [=('{SETTING:AS Date Filter Beg}'!='' ? '{SETTING:AS Date Filter Beg}' : '2010-01-01')] |
Constraint:
func: | db.ExecStoredScript('@@LoadEntityVariables') |
command: | |
Constraint: [=TN(‘{SETTING:AS Entity Id}’)]>0
entityName: | {SETTING:AS Entity Name} |
Constraint:
settingName: | AS Entity Balance |
settingValue: | {ENTITY BALANCE} |
Constraint:
fieldName: | Date ZeroBalance |
fieldValue: | {SETTING:AS Entity Date_ZeroBalance} |
AS Load Account Statement
Rule Name: | AS Load Account Statement |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Load Account Statement |
Constraint:
AMCname: | AS Set Statement Variables |
AMCvalue: | [:CommandValue] |
BGcolor: | |
delay: | |
Constraint: [=TN(‘{SETTING:AS Entity Id}’)]>0
module: | Entity |
parm: | Account Statement |
hideHeader: | True |
AS Print Account Statement
Rule Name: | AS Print Account Statement |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Print Account Statement |
Constraint:
AMCname: | AS Set Statement Variables |
AMCvalue: | [:CommandValue] |
BGcolor: | |
delay: | |
Constraint:
EntityId: | [:CommandValue] |
AS Load Ticket
Rule Name: | AS Load Ticket |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Load Ticket |
Constraint: [=TN(‘{SETTING:AStid}’)]==0
MessageToDisplay: | Select a Ticket |
Constraint: [=TN(‘{SETTING:AStid}’)]>0
TicketId: | [=TN('{SETTING:AStid}')] |
AS Date Filter
Rule Name: | AS Date Filter |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Date Filter |
{SETTING:ASDF} | Is Not Null |
|
Constraint:
settingName: | AS Date Filter Beg |
settingValue: | {SETTING:ASDF} |
Constraint: 1==2
AMCname: | AS Load Account Statement |
AMCvalue: | {SETTING:AS Entity Id} |
BGcolor: | |
delay: | |
AS Credit Account - Ask Values and Payment Type
Rule Name: | AS Credit Account - Ask Values and Payment Type |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Credit Account |
Command Value | Is Not Null |
|
{SETTING:AS Entity Balance} | Less | 0.01 |
Constraint:
settingName: | AS Credit Amount |
settingValue: | [?Amount of Credit;;;ONC] |
Constraint:
question: | Customer Account Credit\rCustomer : {SETTING:AS Entity Name}\rAccount : {SETTING:AS Account Name}\rCredit Amount : [=F('{SETTING:AS Credit Amount}')]\r\rSelect Method of Payment |
buttons: | Cash=Customer Cash:Orange;Gray,Cash USD=Customer Cash USD:Green;Gray,Credit Card=Customer Credit Card:Black;Gray,Credit Card USD=Customer Credit Card USD:Blue;Gray,Cancel=Cancel:Red;Gray |
AMCname: | AS Credit Account - Apply |
BGcolor: | Purple |
TPcolor: | |
AS Credit Account - Apply
Rule Name: | AS Credit Account - Apply |
Event Name: | Automation Command Executed |
Execute Rule if: | Matches |
Automation Command Name | Equal | AS Credit Account - Apply |
Command Value | Not Equals | Cancel |
[=TN('{SETTING:AS Credit Amount}')] | Greater | 0 |
Constraint:
settingName: | AS Payment Type |
settingValue: | [:CommandValue] |
Constraint:
settingName: | AS Credit Amount |
settingValue: | [=TN('{SETTING:AS Credit Amount}')] |
Constraint:
settingName: | AS Credit Description |
settingValue: | {CALL:pay.UpdateDescription('{SETTING:AS Payment Type}')} |
Constraint:
MessageToDisplay: | Desc:{SETTING:AS Credit Description} Typ:[='[:CommandValue]'.substr(9,11)] cur:[='{SETTING:AS Payment Type}'.slice(-3)] PT:{SETTING:AS Payment Type} Cr:{SETTING:AS Credit Amount} AccId:{SETTING:AS Account Id} {DATE} {TIME} |
Constraint: [=TN(‘{SETTING:AS Credit Amount}’)]>0
DocName: | [:CommandValue] |
AccountName: | |
AccountId: | {SETTING:AS Account Id} |
date: | {DATE} {TIME} |
Description: | [:CommandValue] - Credit Payment - {SETTING:AS Credit Description} |
Amount: | [=TN('{SETTING:AS Credit Amount}')] |
Constraint:
module: | Entity |
parm: | Account Statement |
hideHeader: | True |
This is what we want to build…
Now use one of the Automation Command buttons to navigate to the Entity Screen, then right-click and select
Design Mode
to start adding Widgets…
Name: Entity Details
Text:
<size 1> <br/></size><bold> Entity:</bold> [{SETTING:AS Entity Id}] {SETTING:AS Entity Name} <bold>Account:</bold> [{SETTING:AS Account Id}] {SETTING:AS Account Name}<br/> <bold>Balance:</bold> {SETTING:AS Entity Balance} <bold>Last 0 Balance:</bold> {SETTING:AS Entity Date_ZeroBalance}<br/> <bold>Transactions Since:</bold> {SETTING:AS Date Filter Beg}
Command name value: AS Print Account Statement
Value: {SETTING:AS Entity Id}
Caption: <size 50><sym>⎙</sym></size><br/>Print Account Statement
Command name: AS Date Filter
Refreshing Widgets: Account Statement,Entity Details
Local Setting Name: ASDF
Command name value: AS Load Ticket
Value:
Caption: Display<br/>Ticket
Command name value: AS Pay Account
Value: {SETTING:AS Account Id}
Caption: Pay<br/>Account[=('{SETTING:ISCURRENTWORKPERIODOPEN}'!='TRUE' ? '<size 16><br/>Workperiod must be Open to Pay Account</size>' : '')]
Validation: '{:ISCURRENTWORKPERIODOPEN}'=='TRUE'
Command name value: AS Credit Account
Value: {SETTING:AS Account Id}
Caption: Add<br/>Credit[=('{SETTING:ISCURRENTWORKPERIODOPEN}'!='TRUE' ? '<size 16><br/>Workperiod must be Open to Credit Account</size>' : '')]
Validation: '{:ISCURRENTWORKPERIODOPEN}'=='TRUE'
Command name value: AS Show Account Screen
Value:
Caption: Choose<br/>Different<br/>Account
Name: Account Statement
Report Name: Account Statement
Parameters: Customers,{SETTING:AS Entity Id}
Setting Mappings:
ASdate=Account Statement.1
AStid=Account Statement.2
AStno=Account Statement.3
ASdesc=Account Statement.4
ASamt=Account Statement.5
I will try to add in some explanations of the Automation when I get time…
… reserved for updates …
For anyone wondering how to add an action multiple times like AS Store Value in this tutorial.
Just add the action then move back to Action List, right click and click Display All Values as many times as required.
I have just discovered this so im not sure if its the correct way to do this.
It is correct way. It’s one of many hidden features.
@silentbob another very similar tip is the same can be done with products to allow multiple buttons on same menu category which is sometimes handy for increased speed when using products with portions and pre-selected tags etc.
Thanks a lot @QMcKay for this, I look forward to having this function very much.
I am working my way through the tutorial, and have a few questions. I don’t have some of the Automation Commands or Actions that are shown in the tutorial.
The Automation Commands I’m missing: AS Show Account Screen, AS Set Statement Variables, AS Date Filter, AS Credit Account. For these I have manually typed them into the Rules screens rather than select from the dropdown list, is this correct or do I need to create the Automation Commands?
The Actions I’m missing: Display Ticket and MSG TEST, please can screenshots of these actions be uploaded so I can create them.
I’m nearly there, I just need these small bits to finish.
Thanks again.
P.S is there a plan to have this as a Configuration Task or DB Import at some point? There are a lot of steps and I can easily see people (mainly myself) making a mistake along the way, and finding where the mistake is will be a nightmare!!
Yes, type them in manually. No need to create them. There is no reason to create an Automation Command unless it will be used as a button somewhere. In this case, we don’t need buttons, so there is no need to create them. They will still work properly when manually entered - just be sure no typos.
Display Ticket is just as it sounds - it is a Display Ticket Action…
##Display Ticket##
Action Name: | Display Ticket |
Action Type: | Display Ticket |
Ticket Id: | [:TicketId] |
MSG TEST is a Show Message Action. You do not need to put this Action in your Rules - it was just used for debugging. You can skip it, but here it is anyway…
##MSG TEST##
Action Name: | MSG TEST |
Action Type: | Show Message |
Message: | [:MessageToDisplay] |
I do not plan to make a Configuration Task for this. I will supply DB Import files however. In time…
Has anyone managed to implement this?
I keep getting the following error.
User Explanation:
User said ""
-----------------------------
[Exception Info 1]
Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.<>c.<NotifyEvent>b__3_0(ActionData x)
at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
at CallSite.Target(Closure , CallSite , Object , Action`1 )
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithLogging(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.NotifyEvent(String eventName, Object dataObject)
at CallSite.Target(Closure , CallSite , INotificationClient , String , Object )
at Samba.Modules.AccountModule.AccountSelectorViewModel.OnAutomationCommandSelected(AccountScreenAutmationCommandMap obj)
at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Primitives.ToggleButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Samba.Presentation.App.Main()
Inner Exception 1
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.<>c.<NotifyEvent>b__3_0(ActionData x)
at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
at CallSite.Target(Closure , CallSite , Object , Action`1 )
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithLogging(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.NotifyEvent(String eventName, Object dataObject)
at CallSite.Target(Closure , CallSite , INotificationClient , String , Object )
at Samba.Presentation.Common.Services.CommandExecutionService.ExecuteAutomationCommand(String commandName, String commandValue, Object dataObject)
at CallSite.Target(Closure , CallSite , ICommandExecutionService , String , String , Object )
at Samba.Modules.AutomationModule.ActionProcessors.ExecuteAutomationCommand.Process(ActionData actionData)
at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__5_0(EventParameters`1 x)
at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)
Inner Exception 2
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.<>c.<NotifyEvent>b__3_0(ActionData x)
at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
at CallSite.Target(Closure , CallSite , Object , Action`1 )
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithLogging(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
at Samba.Presentation.Services.Implementations.AutomationModule.NotificationClient.NotifyEvent(String eventName, Object dataObject)
at CallSite.Target(Closure , CallSite , INotificationClient , String , Object )
at Samba.Presentation.Common.Services.CommandExecutionService.ExecuteAutomationCommand(String commandName, String commandValue, Object dataObject)
at CallSite.Target(Closure , CallSite , ICommandExecutionService , String , String , Object )
at Samba.Modules.AutomationModule.ActionProcessors.ExecuteAutomationCommand.Process(ActionData actionData)
at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__5_0(EventParameters`1 x)
at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)
Inner Exception 3
Type: Microsoft.ClearScript.ScriptEngineException
Message: Object expected
Source: ClearScript
Stack Trace: at Microsoft.ClearScript.ScriptEngine.ThrowScriptError(IScriptEngineException scriptError)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ThrowScriptError(Exception exception)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.<>c__DisplayClass51_0`1.<ScriptInvoke>b__0()
at Microsoft.ClearScript.ScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Execute(String documentName, String code, Boolean evaluate, Boolean discard)
at Samba.Services.Implementations.ExpressionModule.ExpressionEngine.Invoke(String expression, String function, Object dataObject, Object[] args)
at Samba.Services.Implementations.ExpressionModule.ExpressionService.InvokeScript(String handlerFunction, Object dataObject)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Samba.Modules.AutomationModule.ActionProcessors.ExecuteScript.Process(ActionData actionData)
at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__5_0(EventParameters`1 x)
at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)
-----------------------------
[Assembly Info]
mscorlib, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v14.1, Version=14.1.11.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.11.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.11.0
WindowsBase, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Domain, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Samba.Services, Version=1.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Stateless, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=1.0.0.0
ReachFramework, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
-----------------------------
if i disable the “AS Set Statement Variables” rule it does not crash.
With this disabled I opened the debugger and noticed the command value does not seem to be passing to the second automation command.
The Action in that Rule is set to run a JScript function:
I just noticed the function shown there is not in the Tutorial. I have added it… thanks for letting me know.
function ExecStoredScript(script) {
var r = sql.Exec(script);
return r;
}
function getRow(sqlcmd) {
var r = sql.Query(sqlcmd).First;
return r;
}
On the param: is Account Statement the name of the Entity Screen? When I select it it just navigates me to the POS Customer Search Entity Screen, (Its top of the sort list) Is this how its supposed to work or should it navigate directly to the Account Operations Entity Screen.
Also when I press Account Operations from the accounts page It will not work. It works fine from a ticket.
When I remove the Constraint: [=TN(‘{SETTING:AS Entity Id}’)]>0 It navigates but does not display any data so it looks like {SETTING:AS Entity Id} Is not being passed from the accounts screen.
Yes, Account Statement is the name of the Entity Screen. I have added this to the last step of the Tutorial (Entity Screen Design).
EDIT: I got this working.
I created a separate Automation Command to use on the accounts screen. And then created the following rule.
Where the payment transaction description is formatted?
I found the Description Template for the account credit.
I just want it to show “Customer Cash Payment” or *Customer Credit Card Payment"
Is it possible to set the format for the date filter ####-##-##