Getting data from local mongo on edit (click edit button)


I am a bit confused here.

so, basically I want to edit one of my content.

The way I do it is that, I get the data from local mongo then put it inside a session then dump all the data when the form is loaded.

the code as follows

FlowRouter.route('/customdatapage/editcustomdata/:customdataID', {
  action: function (params) {
    var config = CustomData.findOne({customdata_id: params.customdataID});
    Session.set("Customdatas", config);
    FlowLayout.render('main', {header: 'header', content: 'customdataForm'});
  name: 'Edit Custom Data'

Extra Code:
the route where I have the edit link

FlowRouter.route('/customdatapage', {
  subscriptions: function () {
    this.register('CustomData', Meteor.subscribe('allCustomData'));
  action: function () {
    FlowLayout.render('main', {header: 'header', content: 'customdataPage'});
  name: 'Custom Data'

what makes me confuse is that.
I got the data when I clicked the edit link. But I got undefined when I copy and paste the link in url.

the edit link is as follow

<a href='/customdatapage/editcustomdata/{{customdata_id}}' >{{customdata_label}}</a>

Is there anything that I miss ?
where should I start debugging this ?

Thank you

still trying after 3 days …