PDF create role required ?

eyal abu hamad
Mega Sage

Hi,

when I create PDF with business rule using system administrator it works fine, but if I impersonate other user it well not work. 
I will attach the business rule

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    var pageProperties = {
        HeaderImageAttachmentId: '8fc5dfa8471275104dcddeae536d4325',
        HeaderImageAlignment: 'RIGHT',
        PageSize: 'A4',
        GeneratePageNumber: 'true',
        TopOrBottomMargin: '72',
        LeftOrRightMargin: '36'
    };
    //var testTest = cuurent.sys_id;
    var html = '<html dir="rtl" lang="he" > <h1>hello world</h1>';


    new sn_pdfgeneratorutils.PDFGenerationAPI().convertToPDFWithHeaderFooter(html, 'sc_task', current.sys_id, PDF TEST', pageProperties, '5f9603e447de35104dcddeae536d43f7');

})(current, previous);

Is there any role needed to create pdf file ?

2 REPLIES 2

Danish Bhairag2
Tera Sage
Tera Sage

Hi @eyal abu hamad ,

 

Can u put some logs at the beginning of the BR script to verify whether the BR is getting executed or not in case of non admin users.

 

Thanks,

Danish

 

Hi,

I added a log and it lunched the business rule

eyalabuhamad_0-1698850289379.png