• Tilak De
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Let me first describe the requirement -

 

I have a managed package that contains an Object called Student. I have to create a many-to-many relationship with another object. I have a junction object for this.

Just imagine, that this package can get installed into different orgs, and the many-to-many relationship can happen with some object called Class or Teacher or Exam (depending on the requirement of the org.)

 

I am creating the second master-detail relationship of the junction object when I have installed the package in the org, and I am storing the API name of the second master-detail relationship in a Custom Settings. (Custom settings also belong to my package)

 

The Student-Teacher or Student-Exam, assignment is happening from a VF page(also belonging to the package). So I need to dynamically select the field API name of the second master-detail, assign value to it and save it.

 

Is there any way to create a Dynamic Insert DML? 

 

Let me first describe the requirement -

 

I have a managed package that contains an Object called Student. I have to create a many-to-many relationship with another object. I have a junction object for this.

Just imagine, that this package can get installed into different orgs, and the many-to-many relationship can happen with some object called Class or Teacher or Exam (depending on the requirement of the org.)

 

I am creating the second master-detail relationship of the junction object when I have installed the package in the org, and I am storing the API name of the second master-detail relationship in a Custom Settings. (Custom settings also belong to my package)

 

The Student-Teacher or Student-Exam, assignment is happening from a VF page(also belonging to the package). So I need to dynamically select the field API name of the second master-detail, assign value to it and save it.

 

Is there any way to create a Dynamic Insert DML?