TransWikia.com

How to insert records in Big Object through developer console?

Salesforce Asked by TESt ADG10 on November 25, 2021

I am creating Big Object through workbench like Survey__b. I inserting record through developer console, in this time showing error:

Variable does not exist.

But i have all variables in the big object. When i highlight these fields(Question1__c, Answer1__c,WhatID__c,WhatObject__c) inserting WhatTime__c only and get ID. How to insert all fields? could anybody help on this.

Inserting data:

Account a = [ select id, name from account limit 1 ];  
Survey__b survey = new Survey__b();  
survey.WhatID__c = a.id;  
survey.WhatTime__c = System.today() + 1;  
survey.WhatObject__c = 'Account';  
survey.Question1__c = 'What is the rating';  
survey.Answer1__c = '1';  
Database.SaveResult saveResult = database.insertImmediate(survey);  
System.debug( ' success ' + saveResult.isSuccess() + ' ' + saveResult );

One Answer

Check the permission.

I have the same error and it is because of the permission.

Once, check all of the field permission, it works fine.

enter image description here

Answered by Cray Kao on November 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP