function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Daniel WrayDaniel Wray 

S-Control Custom Property/Fields/Attributes?

I'm looking for a good way to allow parameters (a proprietary un/pass pair) to be passed through to an applet embedded within an S-Control. I'd like to store these settings at perhaps user/role level, or failing that a company wide admin setting would be acceptable.
 
My only approach so far has been to implement a custom object with username and password fields, which I can see is then referencable within the code for the S-Control for example
 
<PARAM
           name="username"
           value="{!SmsAccountDetails_Username}"/>
<PARAM
           name="password"
           value="{!SmsAccountDetails_Password}"/>

 
However this is clearly the wrong approach to take for a couple of reasons. Firstly, this control is meant to be referenced (say, as a custom link?) on contact/lead pages (it's a messaging addon). There appears to be no way to provide the hook between one of these records and a record in my custom object area containing the user supplied details. Secondly, a user would seemingly be able to edit/create as many SmsAccountDetails records as they would want. There's no way to elect a record to be used within the current user context/session. Custom objects does not seem to be the logical place for these values.
 
I'm now wondering whether it's possible to implement custom fields against the current user/role record which could ideally be edited by the site administrator. I can't see where I'd start with this approach, if it's even possible.
 
Finally, I'm constrained by the fact that whichever solution I do implement, must be exportable as an application to other users.
 
Can anyone offer any advice as to how I might go about solving this problem? Perhaps I'm barking up the wrong tree with a few things (my experience with salesforce.com reaches as far back as five days I'm afraid).
 
Thanks in advance,
 
Dan
DevAngelDevAngel
Why not add two custom fields to the user object?

You should be able to get the userId from a merge field and run a simple query to get the full user record (including you two new fields).
Daniel WrayDaniel Wray
Thanks for the reply. I have the two custom fields in an object already, so I guess I just need to figure out how to perform a query to the object, and reference the desired records.
 
Sounds straighforward, hopefully.
Daniel WrayDaniel Wray
Dave,
 
Is it possible at all to run a query directly from an scontrol area (sort of how merge fields are used), or must the query be submitted via query method of the webservice API from my applet?
 
As far as I can tell, the latter is true, I thought I'd check whether this is the case however to save myself some complexity (and work).
 
Thanks,
 
Dan.