• Chris Ciszak 22
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
We are trying to create a standard salesforce record  directly from within our app. After the record is created, we should obtain the recordId and use it further in our application.

We have encountered problems to accomplish this in LEX.

There are two way to work with new records.
1. Use force:createRecord.
2. Use Lightning Data Service

However, the problem with force:createRecord is that we are unable to obtain the recordId after the creation as the user is directly redirected to the record's home page and there is no documented way to intercept this and obtain the recordId.

The problem with the Lightning Data Service is that it is unable to automatically render the object's entry standard layout, we need to manually specify fields which is a show stopper as it's required that the user are able to change the layout that will reflect in our application. The only place where Lightning Data Service load a form automatically is when we want to edit a record, not create one...

How can we accomplish the following:

1. Display a standard layout for a given object during the creation of the record.
2. Prepopulate some fields.
3. Collect recordId after the record is created.
4. Redirect user to our custom page so we could utilize the recordId.

Any help would be much appreciated.
We are trying to create a standard salesforce record  directly from within our app. After the record is created, we should obtain the recordId and use it further in our application.

We have encountered problems to accomplish this in LEX.

There are two way to work with new records.
1. Use force:createRecord.
2. Use Lightning Data Service

However, the problem with force:createRecord is that we are unable to obtain the recordId after the creation as the user is directly redirected to the record's home page and there is no documented way to intercept this and obtain the recordId.

The problem with the Lightning Data Service is that it is unable to automatically render the object's entry standard layout, we need to manually specify fields which is a show stopper as it's required that the user are able to change the layout that will reflect in our application. The only place where Lightning Data Service load a form automatically is when we want to edit a record, not create one...

How can we accomplish the following:

1. Display a standard layout for a given object during the creation of the record.
2. Prepopulate some fields.
3. Collect recordId after the record is created.
4. Redirect user to our custom page so we could utilize the recordId.

Any help would be much appreciated.