a!dynamicLink( saveInto: { a!save( local!result, null ), a!save( local!error, null ), a!save( local!success, null ), a!save( local!displayErrorDetails, false ), a!writeToDataStoreEntity( dataStoreEntity: cons!IC_ENTITY_TASK, valueToStore: ri!selectedTasks, onSuccess: { a!save( local!success, fv!storedValues ) }, onError: { a!save( local!error, fv!storedValues ) } ), rule!IC_gridTaskTypeEditSelectedTaskSaves( selectedTasks: ri!selectedTasks, displayTask: local!displayTask, auditEventCodes: ri!auditEventCodes, /*currentAuditEvent: cons!IC_TEXT_R_CODE_AUDIT_EVENT_EDIT_NOTE,*/ currentEditField: null ), } )
is this error because of db issue ?
Discussion posts and replies are publicly visible
Hi Sthiag,We can not call store fv!storedValue in OnError' s saveInto. If we are trying to store the same error will be displayed that could not find 'fv!storedValue'.Please have a look on below link;
https://docs.appian.com/suite/help/20.1/Write_to_Data_Store_Entity_Smart_Service.html
the code was fine and was running properly even when I used fv!storedvalue in OnError's saveinto.
As the above poster mentioned, the smart service won't let you save fv!storedValue within the OnError scenario.
However, if your business purpose is to save the values "that would have been saved" into your local variable, perhaps replace your code with:
onError: { a!save( local!error,ri!selectedTasks ) }
It didnt work either. When clicked on the error link, nothing shows up too.
Can you post some code for what the error link is trying to do (as well as what the on error condition of your save is currently configured as)? Without at least this information, we have no way of knowing what may or may not be happening in your interface just based on a screenshot.
What does your "error link" display? I would just show the local!error and ri!selectedTasks somewhere in text boxs on the page to help troubleshoot that you actually have data flowing into the variables you are expecting they are flowing into...
a!richTextIcon( icon: "save", caption: "Save", link: a!dynamicLink( saveInto: { a!save( local!result, null ), a!save( local!error, null ), a!save( local!success, null ), a!save( local!displayErrorDetails, false ), a!writeToDataStoreEntity( dataStoreEntity: cons!IC_ENTITY_TASK, valueToStore: ri!selectedTasks, onSuccess: { a!save( local!success, fv!storedValues ) }, onError: { a!save( local!error, ri!selectedTasks ) } /*onError: {*/ /*a!save(*/ /*local!error,*/ /*fv!storedvalues*/ /*)*/ /*}*/ ), rule!IC_gridTaskTypeEditSelectedTaskSaves( selectedTasks: ri!selectedTasks, displayTask: local!displayTask, auditEventCodes: ri!auditEventCodes, /*currentAuditEvent: cons!IC_TEXT_R_CODE_AUDIT_EVENT_EDIT_NOTE,*/ currentEditField: null ), }
This is the code which generates the error as shown in the above picture. Even the thumbs down hyperlink does'nt show any information when clicked on it.
Your revised onError statement looks reasonable (as long as you only want local!error to contain the current value of ri!tasks when an error happens, which i can't judge for you), but without the code for the thumbs down link I can't tell why it might not be working for you.
I have figured out what the issue is. Its because of giving column property as not null. Thanks a lot for the help.