2 Replies Latest reply on Mar 12, 2019 6:18 AM by Aart_Albint

    UI buttons to go to Parent: fail by number, fail by RecId

    Aart_Albint Apprentice

      I'm building version management for the FRS_Knowledge object, and one of the things I want to add is for child versions of a document to have a warning saying "you can't edit this, go to the master document" and then a button to take the user there. The child versions are contained in the parent document and I have a field that links the two and a field that contains the parent object's Knowledge ID so I can search by RecId or by KnowledgeNumber.


      I've spent some time learning about UI buttons and I've made a button that opens the parent record based on the KnowledgeID.

      The command data for it is:

      { 'ObjectType':'FRS_Knowledge#', 'SearchCriteria':[ {'ObjectId':'FRS_Knowledge#','FieldName':'KnowledgeNumber', 'Condition':'=', 'FieldValue':'$(ParentDocNumber)'} ], }

      When I click this button I get the workspace opening up and then an error:

      UserInterfaceException -- Processing error in list definition 'FRS_Knowledge'.

      I looked up what could be causing this, found this and this on here, and tried making my own List to experiment, but regardless of what list I make, even if it only has one field, this error shows up.



      Fed up, I tried to make a QA that opens the parent object by RecID. I found this article, which shows how to do that in two ways, one of which might be wrong.

      So I made two buttons, one trying to link by ParentLink and one by ParentLink_RecId. Comand Data:

      { 'ObjectType':'FRS_Knowledge#', 'SearchCriteria':[ {'ObjectId':'FRS_Knowledge#','FieldName':'RecId', 'Condition':'=', 'FieldValue':'$(KnowledgeParentLink)'} ], }


      { 'ObjectType':'FRS_Knowledge#', 'SearchCriteria':[ {'ObjectId':'FRS_Knowledge#','FieldName':'RecId', 'Condition':'=', 'FieldValue':'$(KnowledgeParentLink_RecId)'} ], }

      Both of which...

      ...get the same "Nothing was found in your search: text contains "undefined"" error as that thread shows.


      So now I have three buttons, none of which work, and I cannot use the solution of "Open in Parent" in the list view, because you need to be able to open the document directly and go to the parent from it.


      I am hoping it's me doing something wrong, but I can't find what.