Quantcast
Channel: Software Communities : Popular Discussions - ActiveRoles
Viewing all articles
Browse latest Browse all 1277

ARS Rookie needing some help on a script?

$
0
0

Hi-

Let me first explain what I'm trying to do and then tell me if I'm even close or how to fix please!

 

I want to just automatically populate the address based on the office location after a new user is created in ARS.  So, I've already added the office location as part of the create user form and I started with the following VB script but it's not working.  Any help would be greatly appreicated from this point on.  I have many other locations but was just testing with this particular case before I do all of the other locations.

 

Sub onPostCreate(Request)

If Request.Class <> "user" Then Exit Sub

  DirObj.Getinfo
  Loc=DirObj.Get("physicalDeliveryOfficeName")

  If Loc = "Elk Grove" Then
    DirObj.put "streetAddress", "1050 W Arthur Ave"
    DirObj.put "l", "Elk Grove"
    DirObj.put "st", "Illinois"
    DirObj.put "postalCode", "60007"
    DirObj.put "c", "United States"
    DirObj.setinfo
  End If

End Sub

 

Again, thank you!


Viewing all articles
Browse latest Browse all 1277

Trending Articles