Ver.2 New Version Released - Action callable in Record-Triggered Flow (PDF) added, etc.

A new version of the Office File Creator Ver.2 has been released today.

 

Revision details

Actions callable in Record-Triggered Flow (Save PDF) added

Save PDF files by calling OFC actions in the record trigger flow. Only PDF file format is supported.

*This feature is available in Office File Creator Pro.

Use in Record-Triggered Flow (PDF)

 

Call "OFC Save as PDF" action

 

OFCApex class (Save PDF) callable from Apex class added

Call OFC's Apex class from the Apex class and save the PDF file. Only PDF file format is supported.

*This feature is available in Office File Creator Pro.

Call from Apex Class (PDF)

 

Sample Code

ofc2.OFCSavePDF.Requests req = new ofc2.OFCSavePDF.Requests();

req.recordId = 'xxxxxx';

req.templateApiName = 'OpportunityInvoice';

req.executionName = 'Call From Apex';

ofc2.OFCSavePDF.Results result = ofc2.OFCSavePDF.execute(req);

System.debug('result=' + result);

 

Available Word/PowerPoint/PDF child record block output

Block output of child records (multiple lines per record) has been supported only for Excel, but now Word/PowerPoint/PDF also support block output.

*This feature is available in Office File Creator Pro.

Block Output of Child Records

 

When outputting Word/PowerPoint/PDF, all merge fields of the same child object should be set in a single table.

 

Word Output Sample

 

Available Word/PowerPoint/PDF child record group output

Group output of child records has been supported only for Excel, but now Word/PowerPoint/PDF also support group output.

*This feature is available in Office File Creator Pro.

Group Output of Child Records

 

When outputting Word/PowerPoint/PDF, all merge fields of the same child object should be set in a single table.

 

PDF Output Sample

 

Available Cross-object formulas where the Owner references a user and a queue

Cross-object formula merge fields were not supported when the owner field referenced a user and a queue, such as a case object.

In the new version, some user fields can now be used as merge fields.

Output Reference Object (Parent) Field

 

List of available Owner Fields (for objects that reference users and queues)

Field Name

Cross-Object Formula

Example of Merge Field

Id

Owner.Id

{!Case.Owner.Id}

Name

Owner.Name

{!Case.Owner.Name}

Email

Owner.Email

{!Case.Owner.Email}

Username

Owner.Username

{!Case.Owner.Username}

LastName

Owner.LastName

{!Case.Owner.LastName}

FirstName

Owner.FirstName

{!Case.Owner.FirstName}

Alias

Owner.Alias

{!Case.Owner.Alias}

Title

Owner.Title

{!Case.Owner.Title}

Phone

Owner.Phone

{!Case.Owner.Phone}

UserRoleId

Owner.UserRoleId

{!Case.Owner.UserRoleId}

ProfileId

Owner.ProfileId

{!Case.Owner.ProfileId}

LastReferencedDate

Owner.LastReferencedDate

{!Case.Owner.LastReferencedDate}

LastViewedDate

Owner.LastViewedDate

{!Case.Owner.LastViewedDate}

 

Lt and Gt functions added

When outputting Word/PowerPoint/PDF, if the template contains the symbol "<" or ">", the text may be misaligned and the layout may not be output correctly. Previously, it was necessary to create a formula field that displayed the symbol on the object and set the formula field as a merge field.

In the new version, there is no need to create formula fields by using the Lt and Gt functions.

Functions for Merge Fields

 

Lt() Function ・・・ Output the symbol "<".

{!Lt()}

 

Gt() Function ・・・ Output the symbol ">".

{!Gt()}

 

Avoided Salesforce subquery limitation when outputting long text area fields of child objects

If a child object contained long text area merge fields, Salesforce's subquery limitation was applied and the maximum number of child records was approximately 50-200 records. If the upper limit was exceeded, an error occurred.

In the new version, when a subquery restriction error occurs, only the child record where the error occurred is acquired by another method and there are no subquery limitations.

Salesforce Subquery Limitations (Ver.1 only)

 

Bug fixes/Others

  • Fixed a bug in Excel group output that if there is a join of cells in line direction, they are not merged.
  • Fixed a bug in Word rich text image output that caused an error when the image was blank.
  • Fixed a bug in Excel output that the output file name would become '&amp;' when & is included in the file name.
  • Fixed the "An internal server error has occurred" error message that appears in the PDF error output to display error details.

 

 

Version

Ver.2.12

*Existing users of Ver.2 beta have been upgraded.

 

 

Request for manual settings

Please set some manual settings in this version upgrade.

 

Granting field-level security

Please grant the administrator user the permissions to read the following new fields in the OFC_Log object.

OFC Log

Label

Field Name (API)

Apex Class Name

ApexClassName__c

Execution Name

ExecutionName__c

Parent Request Id

ParentRequestId__c

Quiddity

Quiddity__c

 

Change the page layout

Change the page layout of OFC_Log object to "OFC_LogLayout_ver3". Please delete the old page layout.

 

 

OFC Pro/Request to change a template with two or more lines of merge fields of the same child object(Word/PowerPoint/PDF)

With the new Word/PowerPoint/PDF block output of child records, if merge fields of the same child object are set in a template for two or more lines, it will be considered block output, just as in Excel. This will result in an error in the existing template. This will apply to existing templates after April 1, 2025.

If all of the following three conditions apply, please take action.

 

Patterns requiring your action

  1. Using OFC Pro.
  2. File format is Word/PowerPoint/PDF.
  3. The same child object's merge fields are set more than two lines.

 

Example of a template that needs to be changed: Two lines of OpportunityLineItems merge fields are set.

 

Details of your action

  • Please give different names to the child relationship name for the second and subsequent merge fields.
  • Create a Child Object Option record and set in "(Pro) Advanced Relationship Settings" section.

Advanced Relationship Settings

Output different layouts for open and closed cases - Advanced Relationship Settings

 

Example of modified template: Change the second child relationship name to OpportunityLineItems2.

 

Schedule

Until March 31, 2025

Template upload version 2.11 or lower: No block output applied

Template upload version 2.12 or higher: Block output applied

 

After April 1, 2025

Block output is applied to all versions

 

*Please check the "Template Uploaded Package Version" field in the "System Information" section in the OFC_Template template record for the Template upload version.

 

 

Copied title and URL