Questions tagged [create-records]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
85 views

createRecord (UI RecordAPI) in LWC Doesn't Fire Platform Event

Is it possible to fire a PE from within LWC without needing an Apex controller by using createRecord UI API? Here is what I have as a headless quick-action component import { createRecord } from "...
Ozan Botan's user avatar
0 votes
1 answer
173 views

Is it possible to restrict picklist values for a lightning-input-field?

Currently, it seems that there is no way to remove some of the options for a picklist while using the lightning-input-field (in my case on the lightning-record-edit-form). The only solution I came up ...
Ivan Sudakov's user avatar
0 votes
0 answers
29 views

Issue with Creating records thru flow with all access data in community portal

Current Config Organization-wide setting - Sharing Setting Custom Object LeadStage - External sharing - Public Read /Write Community Portal Guest User Profile Custom Object LeadStage - Create, Edit ...
Nams's user avatar
  • 1
1 vote
1 answer
274 views

Opportunity Name required on Create even for Before Save Record Triggered Flow

I have a Record Triggered Flow (Fast Update , before Save) Flow is executed when an Opportunity is Created or Updated. The flow auto populates the name of the Opportunity based on a standardized ...
GroundToCloud's user avatar
0 votes
1 answer
641 views

Trying to get a flow to create a new record in related object but only option is $Record

I'm learning to create a more complex flow, at least for me, and I'm stuck. I've been searching, but I might be missing the right keywords, so hopefully you can help me. I have those two objects: ...
Sebbie's user avatar
  • 27
0 votes
1 answer
638 views

Lightning record edit form is not navigating to record detail page after saving record

I have lightning-record-edit-form and I need to navigate to the record detail page after it is successfully created. I tried the below code and it is not working. What should I change here? HTML Code:...
coder123's user avatar
  • 105
1 vote
1 answer
40 views

Can you create a record in Aura Silently?

I use an aura component as a Global Action, linking to an external website. I would like to track clicks of this action by creating a "clicktracker__c" record. Is it possible to create a ...
Ryan Sherry's user avatar
0 votes
0 answers
27 views

lightning:recordForm parent id lookup value not populating

Account parent object Invoice child object created lightning component where using invoice object fields where account lookup is also present and this component is added on tab section beside the ...
cloudZigZag's user avatar
  • 1,356
-1 votes
1 answer
89 views

Creating a contact with a custom record type from a household

I have a set of custom record types for Contacts. From the Manage Household function, I would like to create a Contact record with an ability to choose one of the custom record types for Contacts. How ...
Guy Incognito's user avatar
0 votes
1 answer
116 views

Can community user create Account in community page?

I want to create account in community page when a community user clicks the button in VF page set in community page. I tried many ways but now I am aware this is impossible by limitation of the ...
Rio Nish's user avatar
6 votes
1 answer
1k views

How can I create a new record, with record type and default field values, presenting a standard layout and without navigating from the current page?

I am aware of the following options, but none of them quite do the job (and here's why): Option What it can and cannot do Aura component and the force:createRecord event Using this event I can open ...
Phil W's user avatar
  • 33.1k
0 votes
0 answers
478 views

lightning-record-form doesn't show fields from the page layout

I created an lwc component which has just the <lightning-record-form></lightning-record-form> and this component is used in the quick action to create a record. It works fine for the ...
Manish Anand's user avatar
0 votes
0 answers
38 views

How to use Record Type for this specific question

I am in the process of adding a new object to my org. I am unsure how to store all the information I need on this object. I need to have 5 sections every time I update this object: 3 sections that ...
Ruth's user avatar
  • 3
1 vote
0 answers
408 views

Error when flow tried to create records: INVALID_CROSS_REFERENCE_KEY: Record Type ID: this ID value isn't valid for the user: 012000000000000AAA

setupForObjectWithNoRecordType() { let defaultRecordType = '012000000000000AAA'; this.recordType = defaultRecordType; this.layout = null; this.recordType = defaultRecordType; this....
Oliver Bolden's user avatar
0 votes
1 answer
50 views

How to reset page on cancel button using RecordEditForm in salesforce aura components

Cancel button is not working while using recordeditform
sandhya 's user avatar
0 votes
0 answers
760 views

LWC Pre-populate default values during record creation

I am trying to Pre-Populate some of the values during the record creation using NavigationMixin I am using below code this[NavigationMixin.Navigate]({ type: 'standard__objectPage', ...
Manish Anand's user avatar
0 votes
1 answer
622 views

Trigger - Create new record and update lookup field with the related record

I have two objects which have a lookup relationship. Object 1 - Task Object 2 - Bonus__c When a task is updated to 'Completed', I am creating a Bonus__c record. How to update the lookup field on Task ...
Nick's user avatar
  • 1
0 votes
1 answer
306 views

Records created using LWC not getting populated with information

I am creating a pop-up modal to create new records for a custom object Student__c using LWC. When I am clicking on the Save button a record is getting created but the fields are all blank. .html <...
Night Guy's user avatar
  • 212
2 votes
1 answer
2k views

How to Create Record from LWC using External Id in lookup fields

I'm trying to create an object in LWC, without using Apex. So I found out that we can do that with CreateRecord from uiRecordApi : But I'm trying to create a Custom Object (ClientMember__c in our ...
Yaac0's user avatar
  • 155
0 votes
1 answer
2k views

Deployment : Deploy standard quick action which is creating member plan record

We are trying to deploy a quick action(Add_Benefit_Plan ) which is present on Account Object. Action Type of this quick action is 'Create Record'. This quich action create the Record in Member Plan (...
sunil Bhoslae's user avatar
0 votes
0 answers
382 views

Insufficient Privilege on id:[] accountcontactrelation create record failed

Context Account read privilege is at user level Sharing rule allows Users to see other User's Account records, Read privilege only. An LWc on a Visualforce Page allows a user to perform some business ...
BeginnerArtist's user avatar
1 vote
0 answers
209 views

How to find logic that creates a record

I have duplicate records being created randomly in my org. Is there a way to trace down where all logic is occurring that is creating these records? Something like "Where used" but at the ...
Bill Woodson's user avatar
0 votes
0 answers
152 views

Creating Records with restriction rules enforced

I have a RestrictionRule set up on a custom object that compares a number field on said object to a custom number field on the current User ($User) record. The rule operates as expected for existing ...
David Culbreth's user avatar
0 votes
2 answers
8k views

get ID of Create Records element in Flow?

I have a Create Records element in flow. I need the ID of the record created in this element, but I can't see anything like 'Store Id'. Is it possible?
CPS's user avatar
  • 305
7 votes
2 answers
5k views

Portal user cannot edit own account and cannot create new contacts (portal users cannot own partner accounts)

I'm creating this question to share the errors i've found trying to enable Customer Portal Users to edit their Account record, and to create new Contact records, and the solution i've found. I do it ...
José Ureña's user avatar
0 votes
1 answer
10k views

Flow Formula with a Picklist Field

I am building a Flow that creates a new Opportunity if an Opportunity is Closed Won and meets a certain criteria based on a custom Picklist field called Coupon Type Used(Coupon_Type__c). The Picklist ...
NoviceAdmin80's user avatar
0 votes
0 answers
457 views

Is it possible to use object specific fields in a Global Action?

I want users to be able to create a Case from a custom object Order__c using just a button and a pop-up form with some fields. A Quick Action would be perfect, but alas, Case is not a related object ...
Sander de Jong's user avatar
-3 votes
1 answer
2k views

Creating a 100K records in Account salesforce object using apex code [closed]

I am trying to create an 100K Account records in my salesforce org using apex code in developer console, I managed to create till 1000 by this apex code. List<Account> list1 = new List<...
Frank's user avatar
  • 1
1 vote
1 answer
710 views

How to get property from lightning web component based on button clicked

I have a dynamic lwc that generates related lists dynamically. I want to add a New button to the component but want to be able to dynamically get the component from which the new button was clicked so ...
Thomas's user avatar
  • 2,296
2 votes
1 answer
272 views

force:createRecord defaultFieldValues not working with dependant picklist

I'm working with force:createRecord trying to pre-populete some field values and everything is working fine except for the dependent picklist I'm filling. let createRecordEvent = $A....
molinet's user avatar
  • 835
0 votes
2 answers
793 views

How to prevent Navigate to an record Detail Page

How would you create a relatedList record and stay on the same page instead of redirecting to the newly created record? the below code works fine but the problem is that it's redirecting. here is my ...
Nick's user avatar
  • 6,884
1 vote
0 answers
194 views

Unable to create a new Account via Apex

I am facing the issue where I am unable to create a new Account object via apex. However, I can create an account manually. I was wondering if it is related to permissions then I shouldn't be able to ...
Badar's user avatar
  • 45
0 votes
1 answer
667 views

Insert record from static resource csv

I have csv file with account records and want to insert that records via apex. How can i do it and dynamically find necessary fields? I can only manually assign them and its hard to parse cause of ...
Tirkocuyda's user avatar
0 votes
1 answer
83 views

Populating date on e.force:createRecord

I'm trying to populate the last day of the year on the CloseDate (Date) field. I've tried everything from this link: https://stackoverflow.com/questions/13255114/retrieve-the-last-day-of-the-year-in-...
ThatGuy's user avatar
  • 75
0 votes
0 answers
460 views

Looping without a collection variable in flow

I am working on a requirement to create child records based on the field value present in the parent record using flow. If Obj__c is the parent object and Ch__c is its child object and if count__c is ...
Suhasini's user avatar
  • 197
0 votes
1 answer
372 views

Creating records on click of a button

We have 3 objects Parent, Child, GrandChild. We have a button called "Create Records" on the record detail page of Parent object. On click of that button, the requirement is, using the field ...
Suhasini's user avatar
  • 197
0 votes
0 answers
381 views

platform event not created from flow

I created a flow that triggeres on every created lead and publishes a platform event "leadCreated". Whenever I manually add a lead in salesforce lightning UI, the platform event is created ...
Julius Diedenhofen's user avatar
0 votes
1 answer
2k views

How can I add a new field before writing the data received from record-edit-form?

I have an LWC component and I'm trying to add a new record using record-edit-form: <lightning-record-edit-form object-api-name={objectApiNameExpenseCard} ...
unique user's user avatar
0 votes
1 answer
71 views

How can I track the moment when a new object field is added in a batch class?

I have a batch class: public class DataValidation implements Database.Batchable<sObject>, Database.AllowsCallouts{ private List<String> missingDates; public ...
unique user's user avatar
1 vote
1 answer
5k views

Standard Create-record modal in LWC without page redirect?

Is it possible to call the standard create record modal without invoking a page redirect. After reading this thread I learned that you can call the create record event using lightning navigation mixin....
Thomas Raynold's user avatar
0 votes
1 answer
330 views

Sharing rules restrictions read-only

Is it possible to prevent a user who has read-only acces to an object OWD Private creating child records with another owner of the parent record. I currently have a custom object where I can add child ...
Thomas's user avatar
  • 2,296
0 votes
1 answer
792 views

data loader import - no value for mandatory fields

I need a little help with a data loader import. I have a .csv with account records and some of the fields need to have a value, they're required. I need to know how can I import the file because there ...
Simona Croitoru's user avatar
0 votes
1 answer
247 views

Is it possible to distinguish in a trigger if a create new record is started from a related list or from the object

I have a requirement to pre-fill some fields when a record is created from a related list. These requirements are different when created from the object itself. Is there a way that I can capture this ...
Thomas's user avatar
  • 2,296
0 votes
1 answer
2k views

How to get the record Id when the Save button of aura component is clicked so that it can be used to redirect to the other component?

I've to create an aura component which will contain a form and when the data is saved by clicking SAVE button it should redirect us to another component. The issue i'm facing is how to get the record ...
SouravRai's user avatar
0 votes
1 answer
90 views

Create multiple custom permissions

I have a requirement to create multiple(around 100) custom permissions. Can this be done using data loader or workbench? In data loader when we select insert option I don't see custom permissions ...
Sudhir Balijepalli's user avatar
0 votes
0 answers
71 views

How to correctly implement the selection of an account in the picklist so that it is correctly recorded in the new contact?

I have a form to add a new contact and am having trouble recording if I fill in the "Account" field. If you do not fill it in, then the new contact is added to the database without any ...
unique user's user avatar
0 votes
1 answer
306 views

Create record from view in background

I currently have a lightning component from which I want to save a string into a record. In my javascript controller I create a record when a button is clicked. A dialog is shown to save the record ...
Thomas's user avatar
  • 2,296
0 votes
1 answer
277 views

Can I set up a way where users allowed to create Opportunities only from Contacts?

My initial idea was to hide - New - button from the Opportunities recent list, its already hidden on the Account page layout, but I'm starting to doubt that's the right way, what approach should I use?...
kikalz's user avatar
  • 39
0 votes
0 answers
284 views

Pass current loggedin user id in lookup field in lightning component

Eximanie Record field is a user lookup and i want to populate this lookup value as current logged in user, but it is showing still blank on lightning component. ({ doInit: function(component, ...
cloudZigZag's user avatar
  • 1,356
0 votes
1 answer
328 views

Error on standard new record create button on list view in Winter 21

You get following error in technical description. When creating a new record using standard New button on a given list view in Winter'21 orgs for specific record types only Uncaught (in promise) ...
Omkar Deokar's user avatar