0 votes

Hi All,

I have a field called IP Phone which allows us to enter the users IP phone number which our Mitel system uses to create the users extension in Mitel.

We need to add another field (Which does not necessarily need to be visible) that updates from the extension adding a * in between the second and third number.

So we enter 1001 I then want the new field to put 1*001 any assistance would be appreciated thanks.

by (100 points)
0

Hello Kevin,

Could you, please, clarify what attribute is used to store the extension? Or is it the IP Phone property itself that should be updated with an asterisk (*) character and saved to another property?

0

We currently complete the IP Phone property name but I need to create a field to update Extension attribute 13 that automatically populates once someone enters an extension into the IP Phone field thanks.

the text in the extension attribute 13 field needs to be what ever is entered into the IP Phone box but with a * between the 1st and 2nd characters e.g.

I enter 1001 into the IP phone box then move off the box or save, i need the extension attribute 13 box to auto populate with 1*001 thanks.

1 Answer

0 votes
by (11.1k points)
selected by
Best answer

Hello Kevin,

The solution will include a Business Rule executed After Creating a User and a PowerShell script. The script will take the value of the IP Phone property, insert an asterisk (*) between the first and the second character and update the Extension Attribute 13 property. To implement the solution:

  1. Launch Adaxes Administration Console.

  2. In the Console Tree, right-click your service node.

  3. In the context menu, navigate to New and click Business Rule.

  4. On step 2 of the Create Business Rule wizard, select User object type.

  5. Select After Creating a User and click Next.

  6. Click Add an Action.

  7. Select Run a Program or PowerShell script and paste the below script into the Script field. In the script, the $extensionProperty variable specifies the LDAP name of the property that will store the updated IP Phone value (with asterisk).

     # Get property value
     $extensionProperty = "extensionAttribute13" # TODO: modify me
     try
     {
         $value = $Context.TargetObject.Get("ipPhone")
     }
     catch
     {
         $Context.LogMessage("The property IP Phone is not specified for user %fullname%.", "Information")
         return
     }
    
     # Update the user
     $newValue = $value.Insert(1,"*")
     $Context.TargetObject.Put($extensionProperty, $newValue)
     $Context.TargetObject.SetInfo()
  8. Specify a script description and click OK.

  9. Click Next and finish creating the Business Rule.

0

To Support3 Thanks very much that worked great.

Related questions

0 votes
1 answer

Hi we want to Copy the Master Data Location properties (Adress, Company, Country etc.) from one User to another User. Personal Data like Name, Mailadress, Groups ... hope someone can give us something similar just for properties. Thank you in advance Marcus

asked Sep 7, 2023 by mvr (20 points)
0 votes
1 answer

We have a potentially complicated sitaution and so far I have no found a solution. Any suggestions will be greatly appreciated. We have specific security groups that ... or see any user details other than the memberships for these specific security groups.

asked Jan 2, 2023 by WannabeGuru (20 points)
0 votes
1 answer

goal is to copy groups from one user to another during the crete user process. I created a variable on the create user form to input the UPN of the ... primaryGroupToken") -eq $primaryGroupId) { continue } $group.Remove($Context.TargetObject.AdsPath) } }

asked Nov 30, 2021 by Derek.Axe (480 points)
0 votes
0 answers

Is it possible to trigger an action 'after removing a member from a group' unless that member is a member of another group? For example I have two security groups: 'DS Senders' and ... 'DS Senders' but not if they are a member of 'DS Viewers', and vice versa.

asked Oct 26, 2021 by bavery (250 points)
0 votes
1 answer

Hello I am trying to set up a script to copy the 'Members Of' from specific accounts to a new user account after creating the user. Something very similar to this: https:/ ... to the ever changing nature of the business. Is someone able to help me with this?

asked May 28, 2020 by adantona (40 points)
3,346 questions
3,047 answers
7,782 comments
544,988 users