0

I am using following blog to create idea from inbound email:

https://developer.salesforce.com/page/Code_Sample_-_Creating_Ideas_from_inbound_emails_using_Email_Services

When I send an email to the email address of Email Service. I get the below error:

class CreateIdeaFromEmail failed due to: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Zone]: [Zone]

I am not getting how to use Community (Zone) object and assign zone to Idea?

Can someone help on how to fix this error ?

Thanks Nishant

1

I believe the communityId field is required. Here's an example of how you'd query for a zone id and assign the id value to the idea before insertion.

i.communityId = [SELECT Id FROM Community WHERE Name = 'Test Zone'].Id;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.