Skip to content

Instantly share code, notes, and snippets.

@magnet88jp
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save magnet88jp/c4ae7f6477a756450266 to your computer and use it in GitHub Desktop.

Select an option

Save magnet88jp/c4ae7f6477a756450266 to your computer and use it in GitHub Desktop.
return Rendered page via Apex PageReference
// 現在のsentences データから Solution の Answer を更新
public PageReference renderContent() {
PageReference pageRef = new PageReference('/apex/faqpreview?sid=' + solution.id);
Blob content = pageRef.getContent();
Solution solution = [SELECT id, Answer__c FROM Solution
WHERE id = :ApexPages.currentPage().getParameters().get('id')];
solution.Answer__c = content.toString();
update solution;
return ApexPages.currentPage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment