cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Is there a way to programmatically set a user windchill preference?

BrianKrieger
7-Bedrock

Is there a way to programmatically set a user windchill preference?

No luck so far with the service (PreferenceService2) setvalue methods.  I see they are there but I must be misreading the method signatures.  I'd like to try to allow the users to set preferences through a web page (to enable other validation, etc. niceties).

2 REPLIES 2

Ah.  So right wrong or indifferent, setting preference worked with:

   PreferenceHelper.service.setValue("<INTERNAL PREFERENCE NAME>","<CLIENT NAME>", "<UPDATED VALUE>", <CURRENT WTUser>);

But (FYI) I don't see this as a supported call according to the javadocs.....

BenPerry
13-Aquamarine
(To:BrianKrieger)

Brian Krieger‌,

I've been using PreferenceHelper.service for a year in 10.2 M030.  It is called nearly daily.

You're right - it is not marked as supported.  But it seems to be working.  Just do careful testing whenever upgrading.

Shirishkumar Morkhade‌‌ and I put some code around this for both getValue() and setValue() back in February 2016.  My support case is C12653301.  I know you can't view that ... but Shirish could view if he wanted to refer back to it and add anything else to this message.

Top Tags