Application Script Help...
I am finding the information on Application Scripts to very limited.
I want to capture currentvalue from a parent table in order to retain historical data, but I am unclear on which type of field to capture this data. ..or even types of fields/data I can pull from. According to the videos, I think that I need something like this:
def x = ["field within current table"]
x = currentvalue["Relationship name to parent"]["field name of parent"]
Am I missing something???
Justin Mauldin commented
Thank you for reaching out to us with your question.
Per our phone conversation a little bit ago, we were able to identify that you are trying to reference a Calculated Field in your App Script and Calculated Fields cannot be referenced in App Scripts. Also, you need to do a "Before Insert" instead of "After Insert" event.
Also, since you can't reference Calculated Fields, you will need to reference the field in your grandparent table directly in the App Script.
Finally, a great resource for learning how to write the correct syntax of App Scripts in the Groovy language for your functions you are wanting is the website: http://groovy-lang.org/syntax.html.