Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object Code Button - Page Redirect

AzmathullahKhan
Contributor III

Archer Version 6.2 P5

I am looking to create a Custom button "Save and Redirect" that do one of the following

1) Save the record and redirect the current window to a webpage like https://www.google.com/1111. (1111 is the tracking id)

2) Save the record and in the new tab to a webpage like https://www.google.com/https://www.google.com/1111 (1111 is the tracking id)

 

Let me know if it is possible in Custom Object or Calculated field.

 

Also please give me references where I can find custom code examples and is there a online help to build my own custom code. I am aware of Java, JavaScript and C#.net languages. 

2 REPLIES 2

Ilya_Khen
Champion III

You need to utilize the HTML5 session container, I would say.

https://www.w3schools.com/html/html5_webstorage.asp

 

During the save put data in the session variable and process during the page record load. 

DavidPetty
Archer Employee
Archer Employee

It's possible Azmathullah.

 

You can use the following to hijack the Save and Save and close buttons

// Hijack Save and Close Button
$('#master_btnSave').clone().attr('id', 'master_customBtnSave').insertBefore('#master_btnApply');
$('#master_btnSave').hide();
$('#master_customBtnSave').unbind('click').prop("onclick", null).click(function(){ //Your function here);

// Hijack Save Button
$('#master_btnApply').clone().attr('id', 'master_customBtnApply').insertBefore('#master_btnApply');
$('#master_btnApply').hide();
$('#master_customBtnApply').unbind('click').prop("onclick", null).click(function(){ //Your function here});

 

Then you can use, Window sessionStorage Property to store information to be evaluated after the save is done then use the following https://www.w3schools.com/howto/howto_js_redirect_webpage.asp  to redirect to a new page.

 Advisory Consultant