Questions tagged [create-records]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
0 answers
94 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 ...
  • 28.7k
0 votes
0 answers
25 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 ...
0 votes
0 answers
30 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. In the 5 sections, ...
  • 3
1 vote
0 answers
41 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....
0 votes
0 answers
85 views

Pre-populated record form with all default fields

I'm trying to create a (lead) record form that has a few pre-populated fields. I need to have access to the ID of the created record after the user saves the form. I have a few requirements for this ...
0 votes
1 answer
28 views

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

Cancel button is not working while using recordeditform
0 votes
0 answers
288 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', ...
0 votes
0 answers
78 views

Record triggered asynchronous flow vs Maximum number of methods with the future annotation

I have a scenario related to a potential issue we are facing in an org. An autolaunched flow executes once and loops 51 times through a create record element which creates 1 single record in each ...
  • 1
0 votes
1 answer
220 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 ...
  • 1
0 votes
0 answers
55 views

Create OrderPaymentSummary to Test Class

I am working on an OMS and when it comes to testing a return, I have managed to perform all objects up to OrderItemSummary and ReturnOrder. But when creating the OrderPaymentSummary and ...
0 votes
1 answer
40 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 <...
  • 174
2 votes
1 answer
1k 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 ...
  • 124
0 votes
1 answer
291 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 (...
0 votes
0 answers
15 views

Issue facing in create smart store record in Salesforce Mobile SDK Version : 9.2.1 [duplicate]

Issue facing in create smart store record in Salesforce Mobile SDK Version : 9.2.1 Platform : Android Target Android SDK Version : 31 Programming language : Kotlin Here I want to create one record (in ...
0 votes
0 answers
180 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 ...
0 votes
0 answers
49 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 ...
0 votes
0 answers
83 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 ...
0 votes
2 answers
3k 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?
  • 185
3 votes
1 answer
2k 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 ...
0 votes
1 answer
4k 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 ...
0 votes
0 answers
55 views

Create new row in existing data extension

Based on another question related to how to update SFMC data extensions row by row, I'd like to understand how to first load a data extension in general and then create new rows within it. Based on ...
0 votes
0 answers
162 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 ...
-3 votes
1 answer
616 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<...
  • 1
1 vote
1 answer
275 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 ...
  • 2,184
1 vote
1 answer
128 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....
  • 791
0 votes
2 answers
402 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 ...
  • 6,712
1 vote
0 answers
73 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 ...
  • 35
0 votes
1 answer
125 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 ...
0 votes
1 answer
34 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-...
0 votes
0 answers
130 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 ...
  • 185
0 votes
1 answer
101 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 ...
  • 185
0 votes
0 answers
199 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 ...
0 votes
1 answer
628 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} ...
0 votes
1 answer
63 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 ...
1 vote
1 answer
2k 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....
0 votes
1 answer
94 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 ...
  • 2,184
0 votes
1 answer
393 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 ...
0 votes
1 answer
79 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 ...
  • 2,184
0 votes
1 answer
935 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 ...
0 votes
1 answer
55 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 ...
0 votes
0 answers
35 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 ...
0 votes
1 answer
179 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 ...
  • 2,184
0 votes
1 answer
113 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?...
  • 39
0 votes
0 answers
136 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, ...
  • 1,298
0 votes
1 answer
162 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) ...
-1 votes
1 answer
486 views

how to create a salesforce object on a marketing cloud smart capture form submission [closed]

I have a landing page with a smart capture form on it. Upon the form submission, the smart capture simply sends the details into specific data Extention. Now, is it possible to create a 'Lead' object ...
  • 5
1 vote
1 answer
73 views

Order of returned Ids when creating multiple records with the SOAP API

When I create records using the SOAP API, the Id of the created records are returned, and if multiple records are created in a single call, all the Ids are returned. I'm just wondering if there's any ...
  • 125
0 votes
1 answer
50 views

Deny or allow the creation of a new record if in the parent object (records) - the field of the picklist type has the status "closed" or "active"

I have two objects: Training and Participant with a master-detail relationship (Training (master), Participant (detail)). When training is "canceled" (Status (Picklist) field selected ...
1 vote
0 answers
700 views

LWC - what is the best way to create a new record from an existing one?

I have a need to create a new record from an existing one on a Lightning page, but selecting specific fields only, not all (it's about 50/50 of used/unused fields), and adding some new values not on ...
  • 1,409
0 votes
2 answers
194 views

Can I create a different page layout just for the creation of an object?

We have way too many fields on the oppty object. I am trying to create a new page layout, that will be used only upon the creation of a new oppty. That will holda roughly 15-20 fields only that are ...
  • 5,467