New to TeamScript, I am trying to set a Binary field (SEND_TO_DOCUMENTUM)to Yes or No based on a single selection of YES.
I wrote the script below, but keep getting an SYNTAX error -- ERR #25 for the SetFieldValue lines.
The DBNAME of the field is SEND_TO_DOCUMENTUM.
Does someone know what I need to do to remove the errors from the script below?
Dim CurrentRecord, bRetVal, strSystem
If Ext.ShellHasProp("Item") Then
Set CurrentRecord = Shell.Item
bRetVal = CurrentRecord.GetFieldValue("POST_TO_DOC",strSystem)
If strSystem = "YES" Then
Ext.LogInfoMsg is your friend. That writes param to the server Application log.
When dealing with AppScript, you're at a much "lower" level and frequently reading/ writing numeric TS_ID values instead of the textual values you see in the user interface. You will need to study the db Schema PDF from the Serena website and know how TS_FIELDS, TS_TABLES, TS_SELECTIONS and other system db tables work.
I think you'll find that the GetFieldValue is setting strSystem to a numeric value which is the value of "Yes" for that field. Study TS_FIELDS table, especially TS_LABEL1,2, and 3.
CMCrossroads is a TechWell community.
Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.