2 Replies Latest reply on Nov 30, 2017 8:55 AM by MarkLarvo

    Updating a related record

    MarkLarvo Apprentice

      This is related to Knowledge articles and creating version with an approval workflow. Specifically a Quick Action called "Save as New Version" is used on the original article.

       

      SCENARIO:

      Original article:

      Number is 123

      Version 1

      RecID is ABC

      ClonedFrom is null (This is a new field we created.)

      Status is Published

       

      Using a Quick Action " Save as New Version" we clone this object to the new version.

       

      New article:

      Number is 123

      Version 2

      RecID is BCD

      ClonedFrom is ABC

      Status is Draft

       

      Version 2 of the article progresses through the workflow and is ready to be Published. (I assume this is a Quick Action)

       

      Article 1

      Status should become Archived

       

      Article 2

      Status should become Published

       

      Using the ClonedFrom in article 2 (ABC) how do I access article 1 RecID (ABC)

      something like (RecID = article 2(ClonedFrom)

       

      I tried a Run for Child type QA without success: ERROR - Unknown NodeKind: SubExpression.

      New action - SearchAndLink (This did work)

      - Relationship: FRS_KnowledgeAssociatedFRS_Knowledge-

      - Search and link expression: FRS_Knowledge#.RecId = $(KE_ClonedFrom)

      New action - RunForChild

      - Relationship: FRS_KnowledgeAssociatedFRS_Knowledge

      - Child Object Filter: $(KE_ClonedFrom == $([OtherObject]RecId))

      - Action to run: Archive knowledge Article

       

      Help!!!

        • 1. Re: Updating a related record
          AlasdairRobertson ITSMMVPGroup

          So the key to making this work and being able to update either record is a good relationship.  Here is an example from cloning a change (just because I have already written it).

           

          1. Create a new field on change object as Link Field
          2. Add a new relationship to change object relating to change object:

           

          3. Add newly created field to change form (put it somewhere sensible to your change layout)

           

           

           

          1. Add clone object quick action to change

           

          You relationship is now built and the objects created by the clone action, your workflow and then update either of them using run for child quick actions and you don't need to try and do any search and link.

           

          Let me know if you get suck.

          • 2. Re: Updating a related record
            MarkLarvo Apprentice

            Hi Alasdair,

             

            Thanks for the suggestion. I am running into an error getting the parent updated.

            Unknown NodeKind: SubExpression.

             

            I am in the Child article. My workflow has a task that when completed would call the QuickAction "Publish Article".

             

            "Publish Article" should mark that new version Published, then locate the related article and run the QA "Archive Knowledge Article" to mark it Archived.

             

            Here is my QA. (I took out the Published part to keep things simple and keep my article in Draft status until the archive part is working.)

             

            This is an ErrorMessage article but I was hoping to build the QA at the FRS_Knowledge level and not maintain a copy for each article type. Is this where I have gone wrong?

            KnowledgescreenshotClone.png