AnsweredAssumed Answered

Script to delete relationships with other records, but not records themselves

Question asked by collaboratetp on Jan 3, 2016
Latest reply on Jan 4, 2016 by collaboratetp

I have table of computers (ASSETS::) owned by a company, and in the form layout for each computer I have a portal that displays all software (SOFTWARE::) that is associated with/ "installed on" each computer. Made a picker pop-up within the portal which creates the relationships via a join table (Software_AssetAssignment::) that joins/"installs" the software with each asset.


I need to create a script that runs when the drop-down box for Assets::Asset_Status is changed to "Out of Service" that displays a confirmation dialogue box ("ARE YOU SURE?" ) then deletes the relationships between that asset and the software records currently related to it in the join table.


How do I write the script to delete only the relationship to software but not the software record itself? I have a feeling it goes something vaguely like:


IF (Software_AssetAssignment::id_asset = Software_AssetAssignment::id_software)

Go to Related Record

Delete Record ... something something something


I'm so new at this. :-(  I feel like a baby making noises - totally frustrated, knowing they don't make sense to anyone including myself. Any help is appreciated!