Skip to content

Instantly share code, notes, and snippets.


Sergey Marenich smarenich

View GitHub Profile
View APReleaseCustomization.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Linq;
using PX.Data;
using PX.Common;
using PX.Objects.AP.BQL;
using PX.Objects.CM;
View GenerateInventoryReceipy
public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry>
#region Event Handlers
public PXAction<PX.Objects.SO.SOOrder> CreateReceipt;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Create IN Receipt")]
protected void createReceipt()
INReceiptEntry graph = PXGraph.CreateInstance<INReceiptEntry>();
View TwoGrids.cs
using System;
using PX.Data;
namespace Test
public class TwoGrids : PXGraph<TwoGrids, TwoGrids.MasterTable>
public PXFilter<MasterTable> MasterView;
public PXFilter<DetailsTableA> DetailsViewA;
View Acumatica.snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0">
<Title>DAC Field Template</Title>
<Description>Acumatica DAC Field Placeholder</Description>
View SuncUserPassword.sql
if exists(select * from sys.triggers where parent_id = object_id('Users') and name = 'SuncUserPassword')
Drop trigger dbo.SuncUserPassword
Create trigger dbo.SuncUserPassword on dbo.Users for Update as
declare @companyID int
select @companyID = CompanyID from inserted
Update u Set Password = i.Password from [dbo].[Users] u
View MultiCompanyListAttribute.cs
public class DACExt : PXCacheExtension<DAC>
#region UsrField
[PXUIField(DisplayName = "My Field")]
[MultiCompanyList(new Object[]
new Object[] { 2, //Company with ID 2
new int[] { 1, 2, 3 }, //Values for Company 2
new string[] { "1", "2", "3" } }, //Labels for Company 2
View cv_Rates.cs
using System;
using PX.Data;
namespace PX.Objects.CM
public class cv_Rates : IBqlTable
#region TenantID
[PXDBInt(IsKey = true)]
View ConsolidatedTrialBalance.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<relations format-version="3" relations-version="20160530" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
View pp_CopyDashboard.sql
if exists(select * from sys.objects where object_id = object_id('dbo.pp_CopyDashboard') and objectproperty(object_id,'IsProcedure')=1)
drop proc dbo.pp_CopyDashboard
create procedure dbo.pp_CopyDashboard @companyID int, @dashboardID int AS
DECLARE @id int
DECLARE @ids table([id] int)
Insert Into Dashboard ([CompanyID], [Name], [DefaultOwnerRole], [ScreenID], [AllowCopy], [Workspace1Size], [Workspace2Size], [IsPortal], [CreatedByID], [CreatedByScreenID], [CreatedDateTime], [LastModifiedByID], [LastModifiedByScreenID], [LastModifiedDateTime])
OUTPUT inserted.DashboardID INTO @ids
View PDFUsingWebServices.cs
static void Main(string[] args)
Screen screen = new Screen();
screen.CookieContainer = new System.Net.CookieContainer();
screen.Timeout = 10000000;
screen.Login("admin@Demo", "123");
string invoiceNbr = "AR004916";
Content schema = screen.GetSchema();
You can’t perform that action at this time.