You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Salesforce Apex与DocuSign API时自定义Tab字体属性报错求助

Fixing "Variable does not exist : Font" Error in DocuSign Apex SDK

Hey there! I’ve run into this exact issue before when working with DocuSign’s Apex SDK—let’s get this sorted out for you.

The problem here is that DocuSign’s generated Apex classes append an _x suffix to many property names to avoid conflicts with Apex reserved keywords or standard naming conventions. Your code uses Font and FontSize, but the actual property names in the DocuSignAPI.Tab class are Font_x and FontSize_x.

Corrected Code Example

Here’s how to update your tab configuration to include font settings without errors:

DocuSignAPI.Tab tab100 = new DocuSignAPI.Tab();
tab100.Type_x = 'Custom';
tab100.RecipientID = 1;
tab100.DocumentID = 1;
tab100.PageNumber = 1;
tab100.XPosition = 40;
tab100.YPosition = 40;
// Add font properties with the correct _x suffix
tab100.Font_x = 'Arial'; // Valid values include Arial, Calibri, Courier New, etc.
tab100.FontSize_x = '12'; // Accepts string values like '10', '12', '14'

Why This Happens

When you generate Apex classes from DocuSign’s WSDL, the tool automatically renames properties that might clash with Apex’s syntax rules. You’ve already seen this with Type_x (instead of Type), and the same rule applies to font-related properties.

Quick Check

If you’re still unsure about other property names, you can:

  • Open the DocuSignAPI.Tab class in your Salesforce org and inspect the member variables directly
  • Cross-reference DocuSign’s core API tab property docs with your Apex class—most non-primitive properties follow the [PropertyName]_x naming pattern

内容的提问来源于stack exchange,提问作者Jeanson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:51:01