Apex
CloudFiles Client
Generate Document (Sync)
refer to generate document (sync) docid 9davjkiyvj2zfhjw7zcvx document to understand what this method does global virtual list\<generateddocument> generatedocumentsync( list\<types docgenrequestinput> payloads, string runas ) parameters a list of types docgenrequestinput docid\ ytmudeq1iq5fvmmm ndj string runas, usually this would be a static value 'integrationuser' return type list of generated document docid\ wxctaochq6wt l81 7wgz example cldfs clientfactory client = cldfs clientfactory getinstance(); cldfs docgenparams dcp = new cldfs docgenparams(); dcp pdfviewpassword = 'admin'; dcp pdfownerpassword = 'superadmin'; dcp lockpdf = true; dcp allowpdfprinting = true; dcp allowfillingpdfformfields = true; cldfs types docgenrequestinput docgeninputs = new cldfs types docgenrequestinput( '681b4169c697ffdc2aab2731', new map\<string, string>{ 'userid' => '005dl000008fbqgqac', 'recordid' => '003dl00000ysapjqar'}, 'pdf', new cldfs resource( '68887db5ef0b3ca7534dbbd5', 'folder', null, 'cloudfiles', 'workspace' ), dcp ); list\<cldfs types docgenrequestinput> payload = new list\<cldfs types docgenrequestinput>{ docgeninputs }; list\<cldfs generateddocument> generateddocuments = client generatedocumentsync( payload, 'integrationuser' );