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
ZitizonXZitizonX 

Really need some HELP around here

We are creating a simple survey pluggin to SF account. I have 3 custom objects as shown in the image below. And I have defined their relationships. If I have the Campaign ID in my development enviornment how can I create a Survey Custom Object programatically.
 
This is my code;

Campaign campaign = new Campaign();

campaign.Id = "701500000009731";

campaign.Name = "BreakFast Event";

campaign.surverys__r <------ [HOW CAN I CREATE the custom object here and add values]

Here is my DSD.

 

Gareth DaviesGareth Davies
I take it that you mean you want to create an instance of the object not the definition of the object.

Why not have a look at one of the solutions like Clicktools that do exactly what you describe? They have all the
survey building tools, can control the sending and collecting of data and then put the results back into your
custom objects.

They're on the AppExchange, perhaps that'd be quicker?

Cheers
Gareth.
ZitizonXZitizonX
Hey Gareth,
 
Thanks for your comment. I got it working, I got the logic and relationships working. No we don't wanna buy a product. Because this is going be custom implementation and integrated with our system (Email System) and SF.
 
I don't have much experience around SF and I found it was really hard to learn these things through the API guides and User Docs. But finally I got it working, it's all good.