When creating new user in Vtiger CRM lot of predefined settings (time zone, currency, etc.) are wrong form specific company setup. But I was unable to find info how to change in settings, nor with script, without getting too deep into file structure.
Is it possible (and how)?
To change the default value during entity creation, you need to change the order of values by setting the first value you want.
In vTiger each picklist has the values store in a table for example vtiger_time_zone for time_zone.
If, for example, you want to set the time zone to "Europe/Amsterdam" you need to find the corresponding value of the key field time_zoneid through query
SELECT * FROM vtiger_time_zone where time_zone = "Europe/Amsterdam"
In my case the corresponding time_zoneid returned by the query is 44.
At this point, it is necessary to change the sort order of the new desidered default value by excuting the query
UPDATE `vtiger_time_zone` SET sortorderid` = '0' WHERE `vtiger_time_zone`.`time_zoneid` = 44;
Finally, it is necessary that to move to the second position the option with time_zone = "Pacific/Midway" (time_zoneid = 1) by executing query
UPDATE `vtiger_time_zone` SET sortorderid` = '1' WHERE `vtiger_time_zone`.`time_zoneid` = 1;
Thew default currency value, instead, is given by the default value stored in $currency_name in config.inc.php and setted during the installation.
Yes you can change the Time Zone, Currency details from CRM GUI only without going into code. Just follow this simple steps.
Login to CRM with any user. After login you will see User Name or Image (If profile picture set) on top right corner. There you will get a link for "My Preference". Click on that link which will allow to change User wise Setting. This setting will be User wise so it will not take effect for other Users.
Cheers!!!!
Related
I have 2 controls, Start Date and End Date. I would like to have the min and max of a particular field to be selected as default values of the controls. Is there anyway to do it. I tried creating a calculated field, max or min({field},[],pre_filter) but later realized that we can't add calculated field into a parameter. I'm using Standard Edition. Any help/idea is much appreciated.
I encountered a similar question recently and developed a workaround for this by connecting to my Redshift cluster which required 2 things:
A table housing all users for the dashboard in question
A table that houses the metrics I'm setting defaults on
I created a separate dataset for setting default parameters which contained a complete list of my users, along with the min/max values from querying the second table with the value. Something like:
SELECT USER_NAME
, MIN_METRIC
, MAX_METRIC
FROM USERS A
CROSS JOIN (SELECT MIN(METRIC_VALUE) MIN_METRIC
, MAX(METRIC_VALUE) MAX_METRIC
FROM METRIC_TABLE) B
Once you've built this new data set, you'd add it to your existing analysis and utilize it for setting default parameters, adding the controls, and setting the filters to key off of them.
The downside to this approach is that it does require an exhaustive user list as any null users would see whatever the non-dynamic defaults are, but with an appropriate user table, this shouldn't be an issue.
I am using a calculated field in a form (Data Type = Single Line of Text), however I would like to make this field editable for a specific users having "System Administrator" roles.
I tried using the field security profile to make this field editable (so that System Admin can update or create records here) however update/create options are disabled here in security profile and cannot be altered.
Is there an appropriate way to achieve this? Can we make a calculated field editable for specific set of roles?
No, you cannot directly edit the value of a calculated field.
A work-around would be to create a separate field, where only specific users can enter data. In your calculated field you could then add a condition to take either the manually entered value from the other field (if it exists) and otherwise use the original action for the calculated field.
The calculated field is calculated in SQL when you retrieve it, but is not stored in field.
So, for a calculated field there IS NOT a place to store a value. This makes it impossible to have the same field be calculated in some cases and manual in other cases.
You would need to have two fields the calculated fields and an override field. In the calculated field you set a condition that if the override field contains data the action is to set the calculated field equal to the override field. The else has an action to calculate the field as your normally.
Here is an example where I created a field testca(`new_testca') that will if the Account Number is populated use that value and if not its value will be some text I entered, "NEED ACCOUNT NUMBER".
So I'm somewhat new to access 2013, anyways, I've created a form in access 2013 based directly off a table, so no queries involved if that matters, and what I'm trying to do is just have a text box that updates the total value of 3 different fields as they're entered.
right now it's just a plain-text box, the control source is "=[Search Cost]+[Update Cost]+[Copy Cost]", and if I close the form entirely and reopen the record it updates the text box with the total for all three, but the customer wants it to update in real time. Any suggestions?
I just tried your scenario in Access 2013 on a simple form and it updated for me in real time as I entered values. However, that was because each of the three fields values had a Default Value of 0 in my test table.
So I suspect this is not updating for you in real time because one or more of those values is null while you are entering data in the form. Access doesn't know what [Some field value]+Null should be (it's an unknown thing) so it won't display a calculated value in real time on your form until you provide a value for each of the three fields.
So how can you get around this?
You can add a Default Value of 0 or some other value to each of the three fields at the table level.
Or you could modify your form expression to use the NZ function which will convert any null values to zero. So use this expression:
=Nz([Search Cost])+Nz([Update Cost])+Nz([Copy Cost])
Either of those options should achieve your end goal I believe. They did in my quick tests.
I have a cube with Account Numbers stored as text strings. I need to create a report with a parameter that users can enter a list of Account Numbers.
I've created my query and in the filter I have "Account Number". The Operator is "equals" and I have ticked the Parameter check box.
If I run the report now, I can select multiple Account Numbers, but we have over 40,000 accounts so it can take a while to find and tick all the ones I want to report on. I want to be able to type or paste a list of Accounts.
If I go in to the Parameter Properties and set Available Values to "none" I can enter my list of accounts, but when I try to view the report I get this error.
The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated.
I'm guessing I have to go in to the Dataset Properties and do something to the Account Number parameter to format the list of accounts in the correct way, but I have no idea how to do it.
Does anyone have any ideas?
Thanks
David
I finally figured out how to do this.
Create your query with Account Number as a parameter.
In the #CustomerAccountNumber parameter, make sure its type is Text and tick Allow multiple values. Set Available Values to None and set Default Values to No default value.
Go to the properties of your dataset and go to Parameters. In the CustomerAccountNumber parameter set the Parameter Value to this:
=Split(“[Customer].[Account Number].&["+Replace(Join(Parameters!CustomerAccountNumber.Value,"],”)+”]”,”,”,”,[Customer].[Account Number].&["),",")
Now run your report and you should be able to type in a list of account numbers and get results for just those accounts.
I found my answer here.
How do I get the report to use a design-time set value on first run, and then use whatever the user inputs for subsequent 'refreshes'?
I'm using .Net 4 and Telerik Q1 2013 Reporting controls.
I've created a report that has a StartDate and EndDate parameter, which is passed to a SQL query and returns relevant data.
To make it easier for the users to just open and run the report with minimal effort, the StartDate and EndDate have a default value, being set as the first and last day of the current month respectively.
This works great. However, if the user changes these values after the report is loaded, and tries to run the report for say the first to last day of the previous month, the query does not use the user-entered values. Instead it always uses the expression for what is supposed to be the default value.
The way I set the default value is by opening the ReportParameter Collection Editor (right-click in the report, click Report Parameters), and set the Value property of the parameters.
The StartDate is set to:
=StartOfCurrentMonth()
and EndDate is set to
=EndOfCurrentMonth()
Any help would be greatly appreciated!
Stephen,
What you've outlined here works for me, are you maybe not running the service pack? I set the Value property in the ReportParameter Collection editor to both StartDate and EndDate as:
='3/1/2013'
The preview of the Report runs immediately with the default values. I am able to change the values and preview the report fine.
I created a Windows Forms application that creates an instance of the report. When the report first renders, it renders with the default values and I am also able to change the values in the ReportViewer as an end user and re-render the report with no issues.
TopPageViews report = new TopPageViews();
InstanceReportSource reportSource = new InstanceReportSource();
reportSource.ReportDocument = report;
this.reportViewer1.ReportSource = reportSource;
this.reportViewer1.RefreshReport();