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

Could you try what would happen, if you execute only $('#master_btnApply'); code in custom object inside the update function tag. I mean will record be saved at all.

Correct.

If I remove $CM.setFieldValue(changeId, valueArray, '');, then the $('#master_btnSave').click(); executes and the record is saved.

1. What is your VL type: Radio or ValuesPopup or DropDown?

2. Do you run any sort of DDE on the VL?

Also, while emulating the change, can you start the DevTools in the browser and check fir any errors in the console?

The Values List type is a Dropdown. I tried a Radio Button, Checkbox, and Listbox, and the behavior is the same. When I tried a Values Popup, the values list does not get set (and the record is still not saved).

 

I am not running any DDE on the Values List.

I do see an error in the console. Here is a screenshot.

 

pastedImage_1.png

Interesting, something about read only attribute. Are u sure this VL is editable and not read only?

The Values List is a public field and it is editable. I can manually change the Values List and then manually save the record.

 

I am logged in as a sysadmin, but I added a role to my username that provides Create, Read, Update, and Delete access to the application and I added a Record Permissions field to provide Read, Update, and Delete access. I still get the error in the console when I execute $CM.setFieldValue(changeId, valueArray, '');

 

I also tested after removing $('#master_btnSave').click();, and the statement $CM.setFieldValue(changeId, valueArray, ''); still issues the error in the console.

I can only recommend to doublke check that these values are correct IDs:

statusField:"22732",

statusApprove:"74218"