Set Field [Teschnician::Active = "No" & Get (AccountName)]
isn't valid syntax for a set field step. I am guessing that you have two set field steps like this:
Set Field [Technician::Active ; "No"]
Set Field [Technician::AcountName ; Get (AccountName)"]
If so, then you should remove the second set field step so that you aren't specifying your account name in the find. Then your next step would be:
Delete Account [Technician::AccountName]
Thanks for you help but it did not work when I click on the button it just went to the technician page
This how I re-wrote the script
Go to layout ["Technician" ("Tecnician")]
Enter Find Mode
Set Field [Technician::Active; "No"]
Delete Account [Acount Name:Technician::UserName]
What I want to do is delete all accounts with a Active = No
in the security section of FM
So that user can no longer log in.
Perform Find should take place bofore Delete Account.
Note that your script will then delete a single account. If you have multiple users flagged as no longer active, you'll need to put a loop in place after performing the find that loops through your records deleting accounts for each one. This script also leaves the technician records in place. Once you get the basics working here, you'll need to modify this set up so that you don't keep finding and deleting the same inactive technician's account over and over again.