number sequence

hi…frnds

in form i want to add number sequence…for ex i have field sno in form …if i press ctrl+n then it wil goes to next number like 0,1,2 …

plz reply me.

thanks in advance,

Rajesh

Hi Rajesh,

First of all you create a EDT which will be used in the following given code

U have to use the class NumberSeqReference_Customer and override the ‘loadmodule’ method and write the following code in the method:

numRef.dataTypeId = typeId2ExtendedTypeId(typeid(EDT));
numRef.referenceHelp = "Unique key ";
numRef.wizardContinuous = true;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.wizardHighest = 999999;
this.create(numRef);

Here EDT refers to the EDT which you have created.

And after that go to Basic ->Number Sequences and create your own number sequence as per your requirement.

Hope this code helps you.

Hi Rajesh,

Plz find thye code below which will help you :

1)Create an EDT: UB_CompMaster

2)Go to the Module Table:smmParametersTable

Create a method:

public client server static NumberSequenceReference numRefUB_CompMasterId()

{;

return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(UB_CompMaster)));

}

3)Go to the module Class:NumberSeqReference_CRM

Select the LoadModule Method:

//Start

numRef.DataTypeId = typeId2ExtendedTypeId(typeid(UB_CompMaster));

numRef.ConfigurationKeyId = configurationkeynum(SmmCRM);

numRef.ReferenceHelp = literalstr(“CompetitorMasterId”); // Unique key for CompetitorMasterId

numRef.WizardContinuous = false;

numRef.WizardManual = NoYes::No;

numRef.WizardAllowChangeDown = NoYes::No;

numRef.WizardAllowChangeUp = NoYes::No;

numRef.SortField = 13;

numRef.WizardHighest = 999999;

this.create(numRef);

//End

4)Go to the Table:Override initVale Method

public void initValue()

{

NumberSeq NumSeq;

;

super();

NumSeq = NumberSeq::newGetNum(smmParametersTable::numRefUB_CompMasterId(),true);

this.CompetitorMasterId = NumSeq.num();

}

OR

this.CompetitorMasterId = smmParametersTable::numRefUB_CompMasterId().NumberSequence;

This is only for creating Number Sequence in CRM Module. Like wise, Everu module has its own parammeters module… Use the respective parameters table while creating creating Number Sequences…

Thanks for the reply kevin and lalith.