I have a requirement to create a auto number field for Account number in Account object.
The number will start from 10000 then 10001 upto 20000.After that The number will start from A0000 and will go on till Z0000.After that it will stop creating any new accounts and throw an error "account has reached to its maximum threshold".
Need help on how to achieve this urgently.Thanks.
There may be display format field defined in the auto number field.
Try creating auto number field without display format.
Like this:
Why you want to define the upper limit of the auto number?
I was not able to find setting to set upper limit for the field.
You can use validation rule or trigger.
Related
I'm new to Salesforce and I'm trying to make a field for an account number. It will be a unique number that increases. But I would like its default value to be an increment from the highest number of current records since I'm going to import data and those data have some unused account numbers in between.
For example, I have a data with account numbers: 1, 4, 10, 13, 14 -> then the next one's default value would be 14 + 1 = 15.
What's the simplest solution to this? I tried MAX(Account_Number) + 1, but it's not allowing me to use its own value.
I had this issue once and solved it by setting the field as an auto-increment and then creating and deleting large quantities of records to reach my starting number.
If you are importing and want to retain the previous values, this will not work, unfortunately.
You can use a trigger or flow to populate the account number after a record is created.
For the quick and dirty, make a flow and call it from a process builder. If you have the ability to use sandbox and create a trigger, by all means.
Essentially, you would query the sObject with SORT BY AccountNumber__c DESC LIMIT 1 (or whatever the field is named) and access that highest value and increment it and use that to set the value of the record you are creating.
Makes sense?
In SSRS report, I want to perform conditional color formatting where highest rank should be Green and lowest rank should be Red within a Regional Manager group as shown below
Note: Couple of options, I was thinking of includes
I am using custom code function, for deriving Min and Max value, and somehow if I can include grouping filter on Regional Manger then it could work, but don't know if that's possible
In dataset, I create extra columns for each column and store Min\max value in it. But less keen towards this option, since I have 24 different ranks and which would mean, I will need 24 different columns along with current 40 attributes
Any help would be appreciated
I know you don't want to do this for each column, but despite your misgivings it is probably the best approach. Based on my previous answer to your earlier related question you can colour the min and max for each group as follows.
Create a table with fields store, atvrank, and btvrank
Right click the row header, and select Add Group -> Row Group - Parent Group, and choose Regional Manager. Set the Group name to RegionalManagerGroup
Then set the background colour for your cells to
=iif(Fields!atvRank.Value = min(Fields!atvRank.Value, "RegionalManagerGroup"),
"Green",
iif(Fields!atvRank.Value = max(Fields!atvRank.Value, "RegionalManagerGroup"),
"Red",
"White"
)
)
This now finds the maximum and minimum within the current group instead of the whole dataset. You will need to set this expression for each field individually, but this is probably less effort than returning new rows from the database to determine the maximum and minimum for each field.
This approach will give the following output
Please seriously consider this solution. If you have further questions, please just ask.
I am new to using WebRatio and IFML. I need to build a small web application where at a certain point it is necessary to do some validation based on the timestamp a user provides. This timestamp should be between the range of minimum 24hours from now and maximum 14 days.
I hoped to find a way to adapt the values passed from a Time Utility component, add 24 hours or 14 days to it and then use a Compare Validation Rule to validate what the user has entered.
Can someone please explain how I can accomplish my goal here?
the best way to make this validation is to model in the form two hidden fields containing the minimum and maximum value allowed for the timestamp. In this way you can model on the timestamp field two Compare Validation Rules. Each Compare Validation Rule uses the Value Field property filled in with one of the hidden field. So, at the end, the validations on the field express these conditions
timestamp field greater than minimum timestamp
timestamp field lower than maximum timestamp
To fill the hidden fields with the correct value, given the current timestamp, you can use the Dates Function component. You can download it from the WebRatio Addons
I'm creating a budget template in Livecycle Designer.
I have a field where users can enter a percentage as a number (for example if you want to enter 75%, just enter 75).
I'd like another numfield box to take this number and convert it to .75
Can I do this across num fields or do I have to do it one box (where a user enters 75 and it turns into .75 automatically).
If you just want to enter integer numbers in the numeric field then that can easily be done by just taking a numeric field and then simply entering this javascript in the "exit event" of the field as:
var value1=this.rawValue;
this.rawValue="."+value1;
I have several textboxes and users are entering same data in one of these fields. I have another table which is store machine_no. I would like to restrict user for possible wrong entries. Example if there is no machine_no #4 on table, user will be warn with message box.
Machine_no Value1 In first day
1 500
2 400
3 600
Machine_no Value1 second day
1 8678
2 45645
3 54645
Thanks in advance
If you really want to restrict the available choices, I'd replace the free form textbox with a dropdown list of choices populated from your table.
You could use a NumericUpDown control to let the user enter only integers and validate against a generic List of integers or an array of integers (you can load the list with the existing machine numbers on your data base table), and finally you can use ErrorProvider control to show a warning to the user if enters a not valid number.