RedirectWithID.

Jul 17, 2010 at 1:01 PM
Edited Jul 17, 2010 at 1:01 PM

I have a project dashboard that is filtered by project id (query string). on the dashboard i have details of the project and projects tasks filtered by the project ID. within the filtered tasks i have a toolbar that houses a link to create a new task and passes the project's id to the newform.aspx page.  I have jquery on the page to default the tasks project id field to the value of the project id.  I understand RedirectWithID redirects the form on submission, based on the newly created items id(in my case, the newly created task).  My question is, instead of utilizing the Items ID, can i use the querystring's projectid and redirect back to my project dashboard?

 

Coordinator
Jul 17, 2010 at 1:13 PM
PGh0bWw+PGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiI+PGRpdj5Zb3UgZG9uJ3QgbmVlZCBTUFJlZGly ZWN0V2l0aElEIGZvciB0aGlzLiBTaW1wbHkgcGFzcyB0aGUgZGFzaGJvYXJkJ3MgVVJMIGFzIHRo ZSBTb3VyY2UgUXVlcnkgU3RyaW5nIHBhcmFtZXRlciB0byB0aGUgTmV3Rm9ybSBwYWdlLCB3aXRo IHRoZSBQcm9qZWN0SUQgYXMgcGFydCBvZiB0aGF0IFNvdXJjZSBwYXJhbWV0ZXIgdmFsdWUuIFdo ZW4gdGhlIHVzZXIgY2xpY2tzIE9LIG9yIENhbmNlbCwgdGhleSB3aWxsIGJlIHJlZGlyZWN0ZWQg dG8gdGhhdCBTb3VyY2UgVVJMLjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+TS48YnI+PGJyPjxk aXY+PGJyPjwvZGl2PjwvZGl2PjxkaXY+PGJyPk9uIEp1bCAxNywgMjAxMCwgYXQgODo1MSwgImph a3Zpa2UiICZsdDs8YSBocmVmPSJtYWlsdG86bm90aWZpY2F0aW9uc0Bjb2RlcGxleC5jb20iPm5v dGlmaWNhdGlvbnNAY29kZXBsZXguY29tPC9hPiZndDsgd3JvdGU6PGJyPjxicj48L2Rpdj48ZGl2 PjwvZGl2PjxibG9ja3F1b3RlIHR5cGU9ImNpdGUiPjxkaXY+IDxzdHlsZT5Cb2R5e2ZvbnQtZmFt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pbmcgdGhpcyBlbWFpbCBiZWNhdXNl IHlvdSBzdWJzY3JpYmVkIHRvIHRoaXMgZGlzY3Vzc2lvbiBvbiBDb2RlUGxleC4gWW91IGNhbiA8 YSBocmVmPSJodHRwczovL3Nwc2VydmljZXMuY29kZXBsZXguY29tL3N1YnNjcmlwdGlvbnMvdGhy ZWFkL3Byb2plY3QvZWRpdCI+dW5zdWJzY3JpYmUgb3IgY2hhbmdlIHlvdXIgc2V0dGluZ3M8L2E+ IG9uIDxhIGhyZWY9Imh0dHA6Ly9jb2RlUGxleC5jb20iPmNvZGVQbGV4LmNvbTwvYT4uPC9wPiA8 cD5QbGVhc2Ugbm90ZTogSW1hZ2VzIGFuZCBhdHRhY2htZW50cyB3aWxsIGJlIHJlbW92ZWQgZnJv bSBlbWFpbHMuIEFueSBwb3N0cyB0byB0aGlzIGRpc2N1c3Npb24gd2lsbCBhbHNvIGJlIGF2YWls YWJsZSBvbmxpbmUgYXQgPGEgaHJlZj0iaHR0cDovL2NvZGVwbGV4LmNvbSI+PGEgaHJlZj0iaHR0 cDovL2NvZGVwbGV4LmNvbSI+Y29kZXBsZXguY29tPC9hPjwvYT48L3A+IDwvZGl2PiAgPC9kaXY+ PC9ibG9ja3F1b3RlPjwvYm9keT48L2h0bWw+ --Apple-Mail-4-417361324--
Jul 17, 2010 at 1:15 PM

sure i can try that..... lol....

Jul 17, 2010 at 1:30 PM

I wander and not sure if this is possible, but could there be a service that does something like this?

task columns

title, projectid, start date, due date, etc

$().SPServices.RedirectByFieldValue({
    field: "ProjectID",
    redirectURL: "/projects/projectdashboard.aspx",
    querystring: "ProjectID"
});
the above would take the value from field: "ProjectID", then concat the redirecturl value with querystring value to create something like this
"/projects/projectdashboard.aspx?ProjectID=123"
Coordinator
Jul 18, 2010 at 1:27 AM

Sorry about the answer above! Sometimes when I reply from my iPhone, that happens.  Here's what I sent originally:

You don't need SPRedirectWithID for this. Simply pass the dashboard's URL as the Source Query String parameter to the NewForm page, with the ProjectID as part of that Source parameter value. When the user clicks OK or Cancel, they will be redirected to that Source URL.

M.

Jul 21, 2010 at 12:37 PM

Thank you, this worked perfectly.