Steps for Number Sequence

  1. Create Element in BaseEnum ‘NumberSeqModule’ with name as ‘ASM’
  2. Create a new class named as ‘NumberSeqReference_ASM’.
  3. Under this ‘NumberSeqReference_ASM’ class ,have to create two methods. (For Example)

Here for document code I have created a number sequence.

‘DocumentCode’ given in this method is a extended data type.So it is necessary to create extended datatype.if u want to create numbersequence for ‘equipment code’,u have to create extended data type for it.

  1. LoadModule()
protected void loadModule()
NumberSequenceReference numRef;
/* Document number */
numRef.dataTypeId = typeId2ExtendedTypeId(typeid(DocumentCode));
numRef.referenceHelp = literalStr("@ASM66");
numRef.wizardContinuous = true;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.wizardHighest = 999999;
//Suppose if u want to add more number sequences just copy the 8 lines before and paste it here and change the extended datatype.before I created for document code.
} Continue reading 

Disable filtering in Grid

Some time in the Form we can filter by our own value by Press Ctrl + G , but here some time we may receive the Range Value from Execute Query , SO user may neglect that value, in this situation we have to Disable the range for Particular field..

try this code in Execute Query;

this.query().dataSourceName('DataSourceName').addRange(fieldnum(DataSourceTableName, FieldName)).status(RangeStatus::Hidden);