Setting the context record for a Page


#1

Pretty sure I know the answer to this one, but it’s worth a shot…

Is there any way to set the context record for a Page from within the page?

I have a general purpose page with Base object set to “Timehseet”. I would like to set the context record to the current Timesheet when the page is entered with no context record specified. I know I can have the user select the current period from a list, but I’d rather not in this application.

The Page load event looked like a possible place to start, but it doesn’t get triggered if there is no context record.

Suggestions?

Regards,

Randy Oswald


#2

Afternoon Randy,

My first thought would be adding a fragment callback on the list to default it to the current Timesheet by means of a code studio search on the object?

Could that work for you?


#3

Adam,

That would get me halfway there, but since I want to default it to the current timesheet I can get the same effect by simply sorting the list in descending order. In either case, the user still has to click on it to set selected record as the context record.

This certainly isn’t onerous (and it’s how it is working now), but it would be really slick to have everything ready to go in the current timesheet without any user action.

Randy