03-31-2014 11:45 AM
I've had a hard time figuring out how to change the default estimated close date that is prepopulated when a user creates an opportunity.
I've tried tapping into/overriding processEntry, processTemplateEntry, applyContext, applyDefaultContext, setValues, and beforeTransitionTo, with little to no success.
On other scripts I've used setValues successfully, but it seems like the template default always gets stuck and if anything I just want to remove what's entered.
It's OOTB code, so I'm hoping someone has done this before. How do you manipulate the default value (30 days past current date)?
03-31-2014 03:17 PM
Mobility follows the Web stuff since all of it's data is via SData.... and it's in USEROPTIONS ;-)
UPDATE USEROPTIONS SET OPTIONVALUE = [DBTYPE_STR,"2"], LOCKED = [DBTYPE_STR,"F"] WHERE USERID = [DBTYPE_STR,"ADMIN"] AND UPPER(NAME) = [DBTYPE_WSTR,"TXTESTIMATEDCLOSE"] AND UPPER(CATEGORY) = [DBTYPE_WSTR,"OPPORTUNITYDEFAULTS"]
easy to see if you use the SLX Profiler
04-01-2014 10:36 AM
I agree that the opportunity defaults should follow the web logic, and have defaults set via sdata. Any reason that the opportunity type would not default from the user options? In both our customized environment and the OOTB code, the opportunity type is not defaulting from the user options. It did in SLX Mobile 2.
Thanks ~ Chad
04-03-2014 05:21 AM
Our Insert Opportunity page has been customized so that the Estimated Close Date is defaulted to BLANK to encourage our sales reps to actually pick a date and not leave it on the default. We then use validators to ensure the date has been selected and is in a valid range (not before the current date).
We are required to do the same thing in Mobile 3. The opp edit view is passing in the date and that's what I am trying to disable. However, I can't find the JS method to override that will actually allow me to keep the field blank.