+ Start a Discussion
Nick FontanosNick Fontanos 

Adding text in workflow (Process Builder)

I would like to know how to add a text using a formula.

I would like to auto-fill a certain field with a message after it's being created. 

For example, A receivable is created and a field must have this message on the "Message on Invoice" field: "Please contact your Case Administrator if you have any questions."
Best Answer chosen by Nick Fontanos
Nick FontanosNick Fontanos
Hi guys, 

Thank you so much for your responses. I was able to add the text by simply adding " at the beginning and end of the text. 

It worked for me. 

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Nick,

I think you can make use of trigger which would be checking if there are any necessary conditions and adding the text to the field after running a loop over the list of new records.
 
trigger OBJTrigg on object__c (before insert)
{
if(trigger.isbefore && trigger.isinsert)
{
for(object__c o: trigger.new)
{
o.Message_on_Invoice__c='Please contact your Case Administrator if you have any questions';
}
}
}

Additionally, there is also an option called URL hacking that auto-populates values in the field of a new record, you can check this in below link:

>> https://www.salesforceben.com/salesforce-url-hacking-for-lightning-tutorial/#:~:text=What%20is%20a%20Salesforce%20URL,record%20you're%20currently%20on.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks. 
Detra HutchinsonDetra Hutchinson
There is a limitation on the workflow that it cannot accept input from the user. Hence, we need to go ahead with a customized solution for this scenario. I have implemented this in multiple NetSuite projects. Here is the solution which works (1) Have a workflow action script which would call the suitelet. Please see script sample below for workflow action script
define(['N/record','N/runtime','N/redirect'],
    function (record,runtime,redirect){
    function callSuitelet(context) 
    {
    try {
    var currentRecord = context.newRecord;
    var vendorId = currentRecord.id;
    var vendorNumber = currentRecord.getValue('entityid');
    redirect.toSuitelet({
    scriptId: 'customscript_call_rejection_reason',
    deploymentId: 'customdeploy_call_rejection_reason',
    parameters: {'recid':vendorId,'vbTransactionNo':vendorNumber, trantype: context.newRecord.type}
    }); 
    }
    catch (err) {
    log.error("Error while calling Suitelet", err);
    throw err;
    }
    }
    return {
            onAction: callSuitelet
        };
    });
Expand

PrepaidGiftBalance (https://www.prepaidgiftbalance.net/)
Nick FontanosNick Fontanos
Hi guys, 

Thank you so much for your responses. I was able to add the text by simply adding " at the beginning and end of the text. 

It worked for me. 
This was selected as the best answer
jeff mixjeff mix
In the workflow designer, right-click on an item in the workflow designer and select Annotations, Add Annotation. Add the text of the annotation in the space provided. The item shows an Prepaidgiftbalance (https://prepaidgiftbalance.life/) annotation icon. Hovering over the annotation icon displays the text of the annotation.