hi friends,
pls give me some sample code for datasource methods such as create(), link active(), mark(),next()print(), validate write()
am beginner to AX…
dont knw how to use the method propertise
pls help me…
thanx
hi friends,
pls give me some sample code for datasource methods such as create(), link active(), mark(),next()print(), validate write()
am beginner to AX…
dont knw how to use the method propertise
pls help me…
thanx
Hey Arun,
I think you should refer to the same link referred by Jyothi.
Linkactive() : Such method is executed whenever a user moves to another record in the master table that gives an update to all linked data sources.
Next() : Moves focus to the next record in the data source.
Print() : Prints the current record.
Create() : Creates a new record in the data source.
ValidateWrite() : Determines whether data is valid and ready to be written.
Regards,
Geetika
hi Geetika,
i understood the concepts,
while writing the code only am facing some pblm,
i just override the function, but i dont the purpose of the properties…
if u gave examples means, can easily learn
thanx
int next()
{
return Salestable_ds.next();
}
// This will move the focus to the next record in your datasource.
```
Validatewrite()
```
```
// used to check and validate data
```
```
I am using to check mandatory field for address AccountNum
public boolean validateWrite()
{
boolean ret;
;
if(this.Address != "")
ret = super();
else
warning(" Please fill the address value");
return ret;
}
```
hi geetika…
i try this code,
for next()
its not move to the next record,
for validate write its shown error as operator type as compatible wit the operator…
my code is,
Atna_Mark atna;
boolean ret;
;
if(Atna_Mark.Rno != “”)
ret = super();
else
warning(" Please fill the address value");
return ret;
pls tell wat s the error,
thanx
pls anyone help me
thanx in advance
can you share the xpo with me.
Regards,
Geetika
Hi
The next() returns int value.Check that what value you are returning
pls anyone help me
hi geetika
how can i share here?
is there any way to share?
I believe your field Rno is not of type string. In such case(integer) you should write the condition as if(!Atna_Mark.Rno)
If you want error and you dont want it to be written to the database in case if the field is not filled , then It should be like this in your validateWrite method
if(!Atna_Mark.Rno)
ret = checkFailed(strfmt(" Please fill the address value"));
hi karanthi,
am getting error on this line,
// if(Atna_Mark.Rno != “”)
help me
thanx