I am having a requirement in the sales force where the user has to chose values from picklist.But the twist is the user has to select first received and then only it has to allow user to select recived.Can anyone tell me how to achieve this functionality.
Go to Setup | Customize for Standard Objects or Create for Custom
Objects | Click on Record types Then select the record type that you
need to change You'll see a section Picklists Available for Editing
You can specify which values should appear for the record type
Related
I have a field which is a picklist. I want to restrict access to the values in this field based on profile so that certain profiles can only see eg. only 3 values out of 10. others could see 5.
To restrict picklist values, you would need to create separate record types for the object and assign them to your different profiles. You can then edit the available values within the record types on the object.
I have a users table. Then a product types table, and each user can input/edit/delete their own product typess. They can only see their own product typess.
But I want everyone to have a default 'unknown' product type, that can not ever be deleted.
I figure I see 2 ways to do this.
1) make the first row of the product type table 'unknown' and then have that return for every user. But write queries that never let you delete row 1.
2) add an 'unknown' row at the time of each user creation, and add a 'deleteable' column that flags it. And then check for that on each deletion.
Option 1 makes a LOT more sense in my mind for some reason. Is it an okay way to do this? Or is option 2 better from a design aspect?
Thanks
edit:
clarified there is only a users table and a product types table. And I want everyone to have a default product type of 'unknown'
Since you can't have users deleting each other's ProductTypes, your ProductTypes table must currently look like:
ProductTypeId | Name | OwnedByUserId
In that case, I'd be inclined to do a small variant on Option #1: create a UserId = 0 as a "system" | "default" | "shared" user, and have them own the "unknown" ProductType. You get the delete protection for free (since it's another user), but do still need to union when retrieving.
If you want to add other defaults later, then you just make them owned by the "default" user.
If you want to switch to option #2 later (perhaps you want them to be able to delete now), you can use the "default" user as a template and easily backfill the existing users.
I have custom object on which there is a standard field 'Name'. The field type - text (Text(80)). It does not autopopulate, and the values it can be set only through the edit page. This field is not mandatory on the project and on the edit page, but when I create a new record of this object this field is autopopulated by Id of this record. Although it is expected that the field should be left blank.
Can I fix this strange behavior with help of some options or settings? Are there any solutions?
I don't think so, it is either auto number or text in which case it'll be required, can not be left blank, salesforce autopopulates the record with the id in case you do not provide one and there is no setting to change that behavior (that i know of on current releases)
I'll recommend changing your requirements and at least populate the name of the record with something, a naming convention for the record on it's current stage would be helpful,
That way you can list all of your "ANONYMOUS" records and assign them into a queue so a business person can go and put the right info just to cite an example, a custom unique identifier which can be recognized by your system or an external application, but never blank
In force.com I have created a custom object named Sales_Agents. Is there a way to specify that the users I relate here are associated to an real force.com ID ? For instance, how do I create a lookup to a real user under my tenancy account ?
You can make a custom Lookup field on the Sales_Agents object that relates to the User object. You cannot however make a custom Lookup field on the User object that relates to the Sales_Agents object.
This is a platform limitation. There is an idea on the IdeaExchange that you can vote up, but I would not count on it being available any time soon.
Here is how to add a Lookup field to your custom object:
Setup -> Create -> Objects
Select Sales_Agents
In the Custom Fields & Relationships section click New
Select Lookup Relationship and click Next
Select User and click Next
Complete all steps in the new field wizard and click Save
I have created 2 custom objects - 'user details' and 'salary'.
In user details I have this field employee id. If I am searching for some user by entering its employee id,I want to display the salary details of the user in the search table too.
As I am new to salesforce.com, can anyone please give me the code for this??
I think there are 2 ways you could do this.
Create a formula in the user detail to bring the value of the salary from the salary object.
formula may look something like this.... (depending on your objects set up)
salary__r.Salary_Value__c
then in the search results, just include the Salary__c field in the user details object
or
create a visualforce page that will make a soql query and bring the values to be displayed on the page in a repeater.
The former is the easier option, the latter gives you more flexibility and customization.