want to create a time custom time field .. how it is possible ?
Advance thanks
I suggest you look through Creating Custom Objects and Fields. It should help you with current question and future ones.
It is very simple. If you have already created a custom object in its detail page you can add custom fields.
And if you want your date field to be populated automatically, just create it as a formula field and use already predefined function DATE.
Related
To create child record, I use e.force:createRecord but when I type the name of parent record into look-up field, it shows nothing even whole name or some letter.
I want to have the functionality as standard object like contact:
Do I need to config somewhere?
I believe Lightning shows only recently accessed records.
To have more flexibility you might need to create a completely custom component which would include custom lookup.
For my case I used custom components with custom lookup with similar approaches to this post or this one
I've been searching for a while now and can't find any examples of how I could pass a custom value to a template I created with Schema Form. I needed to create a template to allow for the label to be aligned any way the user wants it to be. I got a simple version of the template working, now I need to give the template information like where the label should be aligned and how many columns the field should take so I can have multiple fields on a single row. I've tried passing my custom fields in the field definition and retrieving it in the template from the form object.
firstName = {
labelAlign: "left"
title: "First Name"
type: "string"
}
In the sample labelAlign is the custom field that I want to access through the form object and this is part of the data that is passed through the sf-schema directive. Is there another way I can access this data in my template?
Thanks in advance.
UPDATE
If I pass the custom value in the form JSON instead of the schema JSON the value show on the form but it creates another field at the very end of the form which is not what I am looking for. I've seen schema form examples that show modifying fields in the form JSON without having this problem. Does anyone know how to make this work properly?
I found the answer to my question and want to post it here for others. The object I was looking for was form.schema. That will allow access to properties created in the schema JSON.
I have a managed field from a package. The requirement is such that I can not add this field to page layout. But when I create or clone a record some managed code throws the error that the particular field is required. Since it is not included in page layout, users can not set any value.
Is there any way I can set a default value for this field?
You can't set a default value the easy way like you would with one of your custom fields. First I would try it with a simple Workflow Rule / Field Update combo. For the Workflow Rule you could use a formula condition like ISBLANK(PKG_Field_c). Choose your default in the Field Update. I'm a little worried that the error will be raised before your workflow has a chance to populate it. If so, you could resort to a Before Insert trigger.
I'm a bit thumped on this one. On my site: www.mystorkparty.com a user creates a large registry for her baby shower. Is there anyway to create and save a populated registry and then let the user can just click auto populate and her registry form has a pre-populated form which she can edit further?
Thanks in advance.
Do you mean pre-defined code for a form? In that case, yes you can. Rails was meant to keep repetitive coding at a minimum and you can just create your own .gem file like "myForm.gem" that will generate the proper code for you and route it to a controller giving you the MVC structure.
I have a custom object FlightRequest for Opportunity object and there is an Amount filed both in opportunity and FlightRequest.
I want to set Opportunity's Amount filed value as default in FlightRequest's Amount Field. So whenever New Button clicked for FlightRequest, Amount input should already field with Opportunity's Amount
I m using Standard page layout not any visual force page layout and can not use it.
I saw there is an option to set default value for a field but Opportunity object is not shown in Select Field Type options
please advice how can i accomplish this
thanks in advance
This is possible with a "unofficially" supported technique (meaning everyone has been doing it for 10 yrs and while they say it's unsupported they'll never break it, too many customers use it) called URL hacking. Basically when they click the new button you'll pass the value for your field into the new record page dynamically based on the parent record. There is a good blog post tutorial on this. Give it a try and that should do what you need.
You need to set up a Master-Detail relationship between the objects, then you can setup the Amount field on the FlightRequest object as a formula field that references the Amount field on the Opportunity.
This should accomplish what you need to do. The Master-Detail relationship is essential for the cross-object reference of fields.