Removing None Option in PickList visualforce apex - salesforce

i have created an object with name PS_Detail__c .in this custom object i created a custom field .in this picklist i defined two values Dollar ,Unit.
when i go to P/S Detail Tab for creating a new PS_Detail__c object then i get None also as a value in picklist field .i want only Dollar and Unit as Picklist values .some one please help how to remove this None from Picklist !!

As you have discovered, you cannot make this picklist required at the object level. However, making this field required on the page layout will remove the -None- option from the available options.
To do this, edit the page layout on your object and select the wrench icon next to your field:
Then, you should be able to check the "Required" box in the dialogue box that pops up:

Related

Need to have a custom field in salesforce object that will combine two other fields

We have a requirement where we need to combine two separate fields into one in the salesforce object and then removed those separate fields from the page layout but when the edit option is enabled in the salesforce portal to edit the object the eliminated fields should be there for edit. If further clarification is required, I can also do that
Click here to see the screenshot
I have tried the formula custom field type where I have to write a formula of concatenating the two fields like this given below:Text(Rent_Start_Date_Actual__c) & ","& Text(Rent_Start_Date_Type__c). I have also removed these two separate fields from salesforce page layout but it also gets removed when object window is in edit mode and we do not want that.
Rather than potentially messing with the edit page, have you considered using a simple screen Flow and an action to achieve this? For example, an action to 'Edit Rent Details' added to the page header, and then when clicked it presents the individual fields on a screen flow for editing? Once saved, the page would refresh and update the formula field as required.

<select> tag brings up dynamically a different set of input fields depending on selection in AngularJS

Im trying to create a form, first element should be a tag with a few options and each of them will dynamically bring up a different set of forms depending on what the user chooses. The idea is within the select tag there will be different categories like cars, properties etc.. first user only sees that and when chose, it will bring up a set of input fields that required for that category.
Anyone got an idea what would be the best way to do it in angular?
Using the ui.router module, you can populate a DOM element (ui-view) with an HTML template file. On selection of the dropdown, you're telling angular to go to a different "state".
Check out the following plunkr I made: http://plnkr.co/edit/jnKQOvkE4nJinEQ5zhr6?p=preview

How to load custom post type field values in Wordpress from the database?

I was reading this link about creating a custom post type in Wordpress. In the example, the field value box is text and the user can enter anything inside. I was wondering if it's possible to turn that field value box to a dropdown one, which values are loaded from the database. So for example, under 'Date', there is a dropdown box next to it with dates loaded from the database. Anyone know if it's possible? Thanks!

Salesforce Picklist order

In salesforce, I need to create multi-select picklist field in Account. But as per my use case, I need to mark FIRST selected item from picklist as default.
Can we set the order of selected items from picklist?
If not how we can set as one of the value as FIRST from selected picklist items?
Any ponter will be appreciated.
While creating Multi picklist on Account Object make sure you
checked this checkbox.
first value as default value

How to get a field from account object to be loaded in VF page on selection of account in salesforce

In my VF page i have option of selecting an account, i need to auto populate a label in VisualForce page with a custom field from the selected account.
How can this be done?
Thanks
Prady
the inputField and outputFIeld tags will display the label as well as the appropriate input box/data if used within a pageBlockSectionItem tag.
It might also just do it normally when used, but I know for certain it does within the pageBlockSectionItem tag.
Hope this helps!

Resources