Timeline for Handling Community Nickname field for Customer Portal registration
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 21, 2012 at 0:31 | comment | added | Baxter | My business logic enforced a unique email address so using a trimmed emailAddress and prepending a unique identifier for each customer portal was my solution, less likely that you'll hit that DML limit. | |
Aug 11, 2012 at 17:58 | comment | added | Salesforce Wizard | Whoo my first "Best Solution" :) | |
Aug 11, 2012 at 12:05 | comment | added | Peter Knolle | I think this is the best solution out there at this time. | |
Aug 11, 2012 at 12:05 | vote | accept | Peter Knolle | ||
Aug 10, 2012 at 17:59 | comment | added | Salesforce Wizard | Yes, but I'm not actively wearing at the moment so my magical powers are somewhat diminished. | |
Aug 10, 2012 at 17:06 | comment | added | Peter Knolle | Ahhh...but you have the hat, my friend. | |
Aug 10, 2012 at 15:40 | comment | added | Salesforce Wizard | I should add that I'm completely guessing now:) | |
Aug 10, 2012 at 15:39 | comment | added | Salesforce Wizard | This is only at the time of insert - correct? What about adding a global variable. At the start of the trigger it checks to see if the global Variable is True (True meaning another trigger has called on the variable) If true you have a second global variable be a count. Then you can use Global Variable +1 to get your uniqueness whenever multiple triggers are firing for different user inserts. | |
Aug 10, 2012 at 14:28 | comment | added | Peter Knolle | That's probably the best I'll be able to do. I think that it still isn't totally bulletproof, though. Consider this: User 1 and User 2 match. User 1 queries. User 2 queries. They both have the same QuerySize at this point. User 1 inserts. OK. User 2 inserts and fails. | |
Aug 10, 2012 at 14:07 | comment | added | Salesforce Wizard | How about doing this instead since you're doing this in code anyways. String NickName = LastNameFirstName Query all users where CommunityNickname Starts With NickName If Query results > 0 then NickName = NickName + QuerySize+ 1 | |
Aug 10, 2012 at 13:33 | comment | added | Peter Knolle | That's what I was thinking with my #1 solution. In theory, the combination of those fields isn't necessarily unique. Maybe I could use the username + an increment? I think with just using the username I will still hit the uniqueness problem by having clashes with disabled portal users. I'm curious how others handle this. Based on this issue and other issues I've had with portal, I kind of think that nobody actually uses portal + sites like this, despite what the SF marketers lead you to believe. | |
Aug 10, 2012 at 13:17 | history | answered | Salesforce Wizard | CC BY-SA 3.0 |