Hi guys. Yes I think vendors/affiliates can be done but they are handled differently than roles. You would actually need to use SQL Events to do this and insert the values/update the values directly in the Vendors/Affiliates tables directly. Ill see if we can get an example posted soon but basically you would have to:
1. Create a Dynamic Completion Event with a type of SQL
2. Assuming you were just wanting to set it up as a vendor first (since I think affiliates must be listed as vendors first anyway) the SQL event might look like this:
exec AddVendor 0, 'Vendor NAme', '', '555 W 5th Street', '$(MyCity' etc...
Basically this would be assuming you were inserting into the vendors table using the core AddVendor stored procedure. The etc... is based on all of the parameters below. The AddVendor stored procedure has these parameters below that need to be passed to it. Also, keep in mind that you can use all of the tokens so if you wanted 'Vendor Name' to be a field you can use '$(YourVendorFieldName') etc...
You might first setup a vendor and check out everything that needs to be passed to the table (i.e. Select * from Vendors under Host, SQL). You should also test using the AddVendor stored procedure under Host, SQL as well before using it in a completion event. I would advise that you get the vendor update working first and then focus on the affiliate part next.
One other note of advise, we don't typically advise clients to start updating CORE tables directly. Although this uses the core stored procedure we still would back up your system and/or use a development system to test against. Although I see minimal risk here that is my disclaimer
Parameters that need to be passed to the stored procedure AddVendor:
@PortalId int,
@VendorName nvarchar(50),
@Unit nvarchar(50),
@Street nvarchar(50),
@City nvarchar(50),
@Region nvarchar(50),
@Country nvarchar(50),
@PostalCode nvarchar(50),
@Telephone nvarchar(50),
@Fax nvarchar(50),
@Cell nvarchar(50),
@Email nvarchar(50),
@Website nvarchar(100),
@FirstName nvarchar(50),
@LastName nvarchar(50),
@UserName nvarchar(100),
@LogoFile nvarchar(100),
@KeyWords text,
@Authorized bit