hello every one

my problem is When i am useing SETCURRENTKEY in C/AL code Can any one explane me. i am fully confused

What problem you are facing when using SETCURRENTKEY?

ny probelm with table Keys and Setcurrent Keys Both are confuseing

What do you mean by Confusing?

You should be clear on your question…

If they are confusing contact your senior in office…

this forum is not for training you…

Hi Shiva,

There is nothing to being confused between table keys and set current key.

Table Keys

A table can have multiple keys. These keys are created by user to sort the data based on their requirment. Support you want to sort the data by credit limit of customer, then you need to create a key having field Credit limit.


From multiple keys while during coding you can use any of the keys. When you dont specify any key it takes the Primary key of the table.

By specifying a key, it calculates fast and calcsum can also be used. So for faster execution of Reports and forms while displaying data or calculating data we use setCurrentkey.

What setcurrentkey Does

setcurrentkey temporarily sets the key of the record varibale as key specified by you.

Let me know if you have any other issues.

Thanks & Regards,

Saurav Dhyani