Saving changes are not permitted. Because the changes you have made require the listed tables to be dropped and re-created

Small hack.

If you modify table in Microsoft SQL Server Management Studio, it sometimes says something like 

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be recreated or enabled the option Prevent saving changes that require the table to be re-created. 

Do you know where mentioned option is hidden?

Tools -> Options -> Designers -> Table and DAtabase Designers. Find there checkbox Prevent saving changes that require table re-creation, remove checkbox and enjoy results.

Lua for FXCM Trade Station

Hello everybody,

today I will share with you adventure of learning writing something for Trade Station from FXCM and some other trading companies.

I got one request from client to write for him expert advisor, and it should be for Trade Station in lua, and not in mql4.

I can't say that I was happy, but customer is sacred think, so I started.

Initially I read the manual and realized that lua is simple language with C like syntax. AFAIK C, I decided to look how to develop EA.

So I created file "matrade.lua" which was empty. 

Then in trade station I made the following:

Pressed at button import and pointed to my file:

and as result got error message

For me it meant following. In some way I need to add function Init to code of my strategy. I digged in the folder of fxcm trade station and found interesting folder which had name Strategies, and there I found file When I looked inside of it, found interesting list of files, and among them was file macross.lua.

as you can see from screenshot there was function Init(), and I added it to my file and tried to open again. Imagine my surprise, when Trading Station notified me that my strategy was installed. Of course, with only function Init which is empty my strategy is useless, but now I can continue to look into existing code and develop my strategy.

Acumatica PXSplitContainer


I want to share some discoveries about attributes of PXSplitContainer.

<px:PXSplitContainer runat="server" ID="sp1" SplitterPosition="300" Height="100px">

SplitterPosition="300" means that first item will have height 300 pixels

Height="100px" I didn't notice any changes at page, so I have no idea, why on Earth it is.

CreatedByID cannot be null in Acumatica

Hello everybody,

today I want to share how to cope with error message CreatedByID cannot be null and CreatedByScreenID cannot be null, and so on. In order to get rid of

those error messages use attributes [PXDBCreatedByID], [PXDBCreatedByScreenID],

 [PXDBCreatedDateTime], [PXDBLastModifiedByID], [PXDBLastModifiedByScreenID], 

 [PXDBLastModifiedDateTime], [PXDBTimestamp]. 

If somebody has a question, how I got such error message, the answer is simple. DAC generator generated those fields for me without those attributes, so only with the help of reflector I realized how to fix my issue.

CompnayID in tables and DAC in Acumatica

Hello everybody,

today just short notice of DAC and tables. If you create new functionality in Acumatica and look for creating tables, you should know, that all tables which you'll create should have column CompnayID, and that column shouldn't be reflected in DAC.

Cannot insert explicit value for identity column in table when identity_insert is set to off in Acumatica

Hello everybody,

today I received the following error message in Acumatica:

Cannot insert explicit value for identity column in table when identity_insert is set to off.

After executing SQL


problem wasn't solved, so I needed to search deeper. After attaching with SQL Profiler, I noticed that Acumatica generated SQL, which tried to insert null into key field. Then was time to look in manual. 

And then I noticed that for key fields statement IsKey = true is not used. Instead is used 


So I replaced [PXDBInt(IsKey = true)] with [PXDBIdentity] and problem disappeared.

GoFirstRecord and Configuration screens in Acumatica

Hello everybody,

today I want to share with you one of my mistakes. 

Few days ago I started to develop Configuration screen, or screen which should end at xx101000. After I completed it and passed for testing I faced a challenge. The page should display only the first record. So I implemented some logic which selected the first record. After that I re-read one of the manuals and found that DataSet have property PageLoadBehavior which can be set to GoFirstRecord!!!!

After I removed my code which loaded first record, and added beforementioned property my configuration screen behaved as really configuration screeen. 

Saving complex objects in Acumatica

Hello everybody,

today I want to share one nesessary step which is needed for graph in order to save graph which has more then one DAC ( data access class ).

In my case I have DAC PRPayRoll, which is joined with classes PRPayrollDetails, PRPaySlip, PRTran.

In that case it is needed to mention in graph declaration primary dac.

So instead of writing 

public class PayRollManager : PXGraph<PayRollManager>
I wrote
public class PayRollManager : PXGraph<PayRollManager, PRPayroll>

Where PRPayroll is primary DAC. Or if to quote Acumatica manual PRPayroll is primary DAC for business logic container

Undefined: Cannot read property "length" of undefined

Hello everybody.

Today I want to share how to deal with Acumatica error message

undefined: Cannot read property "length" of undefined.

If you face it, you need to know that some members of your DAC need attribute either PXInt or PXDbInt or something similar. 

One more detail, DAC should have at least one IsKey = true property

Failed to subscribe event CacheAttached in graph

Hello everybody, who follows my blog.

Today I want to share with you some surpsise of Acumatica which taken me some time. 

In one of my graphs I added CacheAttached event in order to modify way of displaying title. As outcome I got something like this:

Failed to subscribe event Graph::Table_Row_CacheAttached in graph Graph. 
Method signature looks like event handler, 
but cache Table has not been found in the list of auto initialized caches.
Remove unused event handlers from code.

Let's assume that Table name is BAccount. 

It is possible to solve with the following statement:

public PXSelect<BAccount> HiddenBacount;

The following statement added BAccount into list of auto initalized caches and solved my problem.