How to submit new Item using sbm AppScript???


I need to create 3 new Items, during my script work, and additional question is how to set required fields, if they are exist on my default submit transition???

  • Should be fairly straight forward:

    Set scrRec = Ext.CreateAppRecord(Ext.tableID("Your Primary Table name here"))

    'set PROJECT DEFAULTS

    Call scrRec.SetFieldValue("OWNER", projectDefaultOwner)

    ' set ALL MANDATORY FIELDS

    Call scrRec.SetFieldValue("MANDATORY1", someValidValue)

    Call scrRec.Add()

    ' if you need to internal id for that new item

    returnSCR = scrRec.GetID()

    ' In my script I have also the following lines

    Call scrRec.Lock()

    Call scrRec.Update()

    Call scrRec.UnLock()

    the trickier part is to determine VALID default values for the required fields depending on the project you want to submit into, you can read the ts_properties table for that

    ' Build an App Record To the Properties table, And search it to find the default value for

    ' the Field we are searching for, for the given Project we are currently In

    ' make sure transition id = 0

    ' Field id can be retrieved from ts_fields

    Set apprecord = Ext.CreateAppRecord(Ext.TableID("TS_PROPERTIES"))

    whereclause = "TS_FLDID = "
  • Title and Description copied from Widget Change Request • Item Type to Task • Task Owner to the Asse.. ... Submit Date to now ... in the Assessors multi-user ' field and create a new Task item in the Issues table the assessor. Mount the volume once, then open System Preferences->Accounts->Login Items and drag ... Send iMessages from the Finder · Quick Look with a three-finger tap ... visit college paper writing service