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

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object to Update Values List and Save 6.3 P5

NicholasPallard
Contributor II

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>

74 REPLIES 74

I still think the field id is incorrect.

 

The first error about 'values' is stating it couldn't find the values currently set for the values list and goes downhill from there.

 Advisory Consultant

Here is the snapshot of field id. It is correct and changing the value but it doesn't move the next statement which is weird to me.

field id.png

Not sure what's the issue is Mathura   I've used the same exact code numerous times and not had any issues.

 

Try changing, <script language="javascript"> to <script type="text/javascript"> and see if that makes a difference.

Also try adding some alerts after the function UpdateValueList(changeId, assignedValue) { like alert(changeId); and alert(assignedValue); to see if the ids are being sent to the function.

 Advisory Consultant

Thank you again David for looking into this!

1. <script type="text/javascript"> didn't work

2. The popups appear with the value but they don't come if I keep them after the below statement

ArcherTech.UI.GenericContent.GetInstance().setFieldValue(changeId, valueArray, ' ');

just for grins can you snapshot your values list id?

valueID:"84163"

Here it is, Jason.

value id.png

Can you attach a screenshot of the actual custom object code window?

 Advisory Consultant

Here you go. Let me know if it is not clear to you.

custom object.png

 

Thanks You!

Thanks, that looks fine.

 

Last thing to try is replace, ArcherTech.UI.GenericContent.GetInstance().setFieldValue(changeId, valueArray, ' '); with $CM.setFieldValue(changeId, valueArray, ' ');

 Advisory Consultant

Unfortunately it didn't work either