Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2018-03-22 09:00 AM
Here is our use case:
In many of our applications users have to select a type first to proceed with the next step. It would be helpful to provide links to create a new record for each type, e.g. Create new task, create new defect, etc. without using a separate application for each type.
I am wondering if the New Record link can be modified to do this. Here is the URL behind the New Record link:
<archer-server>/RSAarcher/GenericContent/Record.aspx?id=0&moduleId=123
Does anyone know if there is a possibility to add a parameter to the above link in order to set a specific values list value?
Maybe something similar like with the navigation menu filters:
/RSAarcher/SearchContent/Search.aspx?View=Filter&fieldId=16721&filterType=ValueList&filterValues=82833&moduleId=438&formatType=ColumnFlat&reportId=5434&isNavMenuReport=true
I tried to combine both links without success.
Thanks,
Markus
2024-01-16 09:45 AM - edited 2024-01-16 09:46 AM
If the link is from outside of Archer, it should be formatted differently and encoded like so: https://localhost/default.aspx?requestUrl=..%2fGenericContent%2fRecord.aspx%3fid%3d0%26moduleId%3d57%26requestType%3d9999
Advisory Consultant
2024-01-16 10:24 PM
Thanks David, now the page does not redirect however the custom object does not work, I mean nothing happens after URL loads. Sorry pasting my code here:
<script type="text/javascript">
var fieldId = 30822;
var paramName = requestType;
$(document).ready(function ()
{
if (getParameterByName(paramName) != '' && getRecordId() == 0)
{
setTimeout(function() {
var valueArray = new Array(1);
valueArray[0] = getParameterByName(paramName);
ArcherTech.UI.GenericContent.GetInstance().setFieldValue(fieldId, valueArray, '');
}, 500);
}
});
function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
2024-01-17 08:30 AM
@RupaKanakala1 add some console.log to your code inside the getParameterByName function like outputting the name variable and the window.location.href and see what's going on.
Also make sure the field you are setting is on the layout.
Advisory Consultant