function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Dynamic implementation

I have custom object Opportunity_CRM__c. Once i upload the data into it i have to create another custom object test__c automatically with employee_id__c as one field.?(i.e dynamically i have to create the custom object) can any one give me the logic to implement this?





you already asked that question here


do you need to create the test__c object or just fill it with the amount of  Opportunity_CRM__c  records I guess you just need to fill test__c, therefore a simply trigger 

on the Opportunity_CRM__c   (insert)


for (Opportunity_CRM__c myOpp{

test__c myTest = new test__c();

test__c.Name = myOpp.Id;

//here put your fields you need into it

 insert myTest;



something like that would populate your test__c with the needed values


if you mean creating the test__c object itself than you will need to think about limits (for each Opportunity_CRM__c record  really 1 object? )


hey thanks.


To use your code I have to manually create the custom object test__c before inserting records.


But i need to create test__c from apex class or triger and only once i have create, not for each Opportunity_CRM record.


is this possible?





only as Vinit already said in the other thread by using the Fiddler tool, which I can't help with