Skip to content

Instantly share code, notes, and snippets.

@BrianMRO
BrianMRO / Blog-MobileBLOG3010-2205.txt
Created May 23, 2022
Blog - Mobile BLOG3010 - 2205
View Blog-MobileBLOG3010-2205.txt
add screen BLOG3010 {
add container "Packages" {
displayName = "Packages"
fieldsToShow = 3
add field "PackageID" {
listPriority = 99
}
add field "OrderType" {
listPriority = 98
}
@BrianMRO
BrianMRO / Blog-MobileGI000095-2205.txt
Created May 23, 2022
Blog - Mobile GI000095 - 2205
View Blog-MobileGI000095-2205.txt
add screen GI000095 {
type = FilterListScreen
add container "Filter_" {
add field "PackageID" {
special = BarCodeScan
}
}
add container "Result" {
add field "PackageID"
add field "OrderType"
@BrianMRO
BrianMRO / Blog-MobileUpdateSiteMap-2205.txt
Created May 23, 2022
Blog - Mobile Update Site Map - 2205
View Blog-MobileUpdateSiteMap-2205.txt
update sitemap {
add folder "BlogPackages" {
type = HubFolder
isDefaultFavorite = True
displayName = "Blog Packages"
icon = "system://Box2"
add item "GI000095" {
displayName = "Blog Packages"
icon = "system://Box2"
}
@BrianMRO
BrianMRO / SQL_Get_Default_MobileSiteMap.sql
Last active May 23, 2022
SQL Script - Get Default Mobile Site Map
View SQL_Get_Default_MobileSiteMap.sql
/* NOTE: Replace [2022R1] with the name of YOUR database */
/* Right-Click the Table in MS SQL Server Mgmt Studio and select "Select Top 1000 Rows" */
SELECT TOP (1000) [CompanyID]
,[ScreenID]
,[Script]
,[Type]
,[CompanyMask]
,[CreatedByID]
,[CreatedByScreenID]
View IsAutoRun.cs
.WithFlowStates(states =>
{
states
.Update<State.approved>(flowState => flowState
.WithActions(actions =>
{
actions.Update(g => g.pushInventoryID, a => a.IsAutoAction(conditions.MyCondition));
}));
})
@BrianMRO
BrianMRO / Workflow_Disable_Hide_Actions.cs
Last active Mar 3, 2022
Workflow - Disable or Hide Actions
View Workflow_Disable_Hide_Actions.cs
#region Actions - Hide (Pre-Defined Action)
screen
.WithActions(action =>
{
action.Add(removeHold);
action.Add(putOnHold);
action.Add(complete);
action.Add(reopen);
action.Add(g => g.schedule, a => a
.WithCategory(processingCategory)
@BrianMRO
BrianMRO / Workflow_Blog_Post_4.cs
Last active Mar 3, 2022
Workflow - Blog Part 4
View Workflow_Blog_Post_4.cs
using PX.Data;
using PX.Data.WorkflowAPI;
using PX.Objects.Common;
namespace Blog.CMMS
{
using static PX.Data.WorkflowAPI.BoundedTo<CMMSWorkOrderEntry, CMMSWorkOrder>;
using static CMMSWorkOrder;
using State = Blog.CMMS.CMMSWorkOrder.Statuses;
@BrianMRO
BrianMRO / Workflow_Conditions_On_Transitions.cs
Created Mar 2, 2022
Workflow - Conditions on Transitions
View Workflow_Conditions_On_Transitions.cs
.WithTransitions(transitions =>
{
transitions.AddGroupFrom(State.InitialState, ts =>
{
ts.Add(t => t
.To<State.hold>()
.IsTriggeredOn(g => g.initializeState)
.When(conditions.IsOnHold)); // CONDITION!!!
});
transitions.Add(transition => transition
@BrianMRO
BrianMRO / Workflow_Using_Conditions
Created Mar 2, 2022
Workflow - Using Conditions
View Workflow_Using_Conditions
.When(conditions.IsOnHold)
@BrianMRO
BrianMRO / Workflow_Define_Conditions.cs
Last active Mar 3, 2022
Workflow - Define Conditions
View Workflow_Define_Conditions.cs
#region Conditions
Condition Bql<T>() where T : IBqlUnary, new() => context.Conditions.FromBql<T>();
var conditions = new
{
IsOnHold
= Bql<hold.IsEqual<True>>(),
IsScheduled
= Bql<scheduleDate.IsNotNull>(),
}.AutoNameConditions();