Examples include checking the Integration User access inside your WaveTemplateConfigurationModifier implementation.
Example
In the onConfigurationRetrival implementation, verify the Integration User access to the Account sObject. Add the access result to the template variables.
In the onConfigurationRetrival implementation, verify the Integration User has access more than 100 records in the Account sObject. Add the result to the template variables.
1public class ExampleWaveTemplateConfigurationModifier2 extends wavetemplate.WaveTemplateConfigurationModifier3{4 public override void onConfigurationRetrieval(wavetemplate.WaveTemplateInfo waveTemplate)5 {6 Boolean enoughAcctRecords = true;7 if (!wavetemplate.Access.getCountOfRecordsAsIntegUser('Account') > 100) {8 enoughAcctRecords = false;9 }10 template.getVariables().get('sufficientAcctRecordsFound').setComputedValue(enoughAcctRecords);11 }12}
Example
Before creating the app, verify Integration User access to an sObject field selected during template wizard processing:
1public class ExampleWaveTemplateConfigurationModifier2 extends wavetemplate.WaveTemplateConfigurationModifier3{4 public override void beforeAppCreate(wavetemplate.WaveTemplateInfo waveTemplate,5 String previousAppVersion, wavetemplate.Answers answers)6 {7 Boolean access = wavetemplate.Access.integUserHasAccessToSObjectField('sObjectFieldExample', template, answers);89 if (!access) {10 throw new wavetemplate.TemplateInterruptException('Integ User doesn't have access to sObjectFieldExample');11 }12 }13}
Example
Before creating the app, verify if there are any sObject fields the Integration User doesn’t have access from an array of fields selected during template wizard processing:
1public class ExampleWaveTemplateConfigurationModifier2 extends wavetemplate.WaveTemplateConfigurationModifier3{4 public override void beforeAppCreate(wavetemplate.WaveTemplateInfo waveTemplate,5 String previousAppVersion, wavetemplate.Answers answers)6 {7 List<String> noAccessFields = wavetemplate.Access.checkIntegUserAccessToArrayOfSObjectFields('sobjectFieldArray', template, answers);89 if (!noAccessFields.isEmpty()) {10 throw new wavetemplate.TemplateInterruptException('Integ User doesn't have access to ' + noAccessFields.get(0));11 }12 }13}