Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-04-16 11:29 AM
We recently moved to version 6.3 P5 and one of our custom objects is no longer working. The purpose of the custom object is to update a values list and then "Save" (previously "Apply"). We do not want to "Save and Close". The issue in 6.3 is that the Save and Close button has returned and now the custom object closes the record instead of saving and staying on the page. I have tried several methods posted by other users, but have not yet had any success in updating the values list and "Saving" instead of "Save and Close". Any advice is greatly appreciated. Below is the code we are using:
<script language="javascript">
var integration = {
fieldID:"11111",
valueID:"22222",
};
function UpdateValueList(changeId, assignedValue) {
var valueArray = new Array(1);
valueArray[0] = assignedValue;
ArcherTech.UI.GenericContent.GetInstance().setFieldValue(changeId, valueArray, '');
ShowAnimationAndPostback('master$btnSave')
}
</script>
<div style="text-align:center;">
<img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:Advance to Step 2 of 5;iconSetStyle:VistaRound;baseColor:%23276CA8;disabled:False" onclick="javascript:UpdateValueList(integration.fieldID,integration.valueID);"></div>
2018-04-16 12:08 PM
$("#master_btnApply").click(); then
2018-04-16 11:59 AM
Instead of
ShowAnimationAndPostback('master$btnSave')
use this:
$("#master_btnSave").click();
2018-04-16 12:05 PM
Hello Ilya,
I appreciate the recommendation, but unfortunately that doesn't appear to have solved the issue. It absolutely updates the values list, but it saves and closes the record and I'm hoping to find a solution that just saves the record (similar to how the old "Apply" button worked.)
Thank you,
2018-04-16 12:08 PM
$("#master_btnApply").click(); then
2018-04-16 12:14 PM
Unfortunately, using $("#master_btnApply").click(); has the same outcome (i.e. it "Saves and Closes"). I tried something similar in previous tests, but renaming it to "Apply" doesn't seem to have the expected outcome.
2018-04-16 12:23 PM
Interesting, I just used btnApply in my 6.3 P5 environment and it Saves the record but does not go out.
Also, this is working fine in my environment: ShowAnimationAndPostback('master$btnApply');
2018-04-16 12:31 PM
Not sure if you figured this out already, but in prior versions of Archer the save button was master_btnSave.
With this new version. The save button is now master_btnApply and master_btnSave is now the save and close button.
So that means with the new release, the code you provided is referencing the new save and close button.
I had a similar issue with a custom object. I just changed my click event to use the master_btnApply and it continues to work as expected.
2018-04-16 12:36 PM
Ilya and Jason,
I truly appreciate your help. I was able to get this working using $("#master_btnApply").click(); as suggested. I actually had two custom objects in my layout that had a similar purpose, but updated the values list to a different value. The issue was that I only changed one of them. Only changing one of them to $("#master_btnApply").click(); made it still operate as "Save and Close", but once I updated the code for both objects it worked as advertised.
Thank you so much for your help.
2018-04-16 12:43 PM
Welcome
2018-08-31 11:47 AM
Hi Everyone,
I am using the below code in 6.4 to create a custom button to change the value list value. It changes the value list but is not saving the record. I tried to troubleshoot it using alert and I found that it always stuck at ArcherTech.UI.GenericContent.GetInstance().setFieldValue(changeId, valueArray, ''); All suggestions and recommendations would be highly appreciated.
<script language="javascript">
var integration = {
fieldID:"23966",
valueID:"84163",
};
function UpdateValueList(changeId, assignedValue) {
var valueArray = new Array(1);
valueArray[0] = assignedValue;
ArcherTech.UI.GenericContent.GetInstance().setFieldValue(changeId, valueArray, '');
alert("Executing Alert");
$("#master_btnSave").click();
}
</script>
<div style="text-align:center;">
<img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:Change Value;iconSetStyle:VistaRound;baseColor:%23276CA8;disabled:False" onclick="javascript:UpdateValueList(integration.fieldID,integration.valueID);"></div>
Thanks,
Mathura