Questions?
They are answered by the XTRF community and our experts
Display popup from macro
Hi,
Is there a way to display an "Are you sure?" popup to the user when executing a macro, and only continuing execution if "Yes" button is pressed?
XTRF Groovy Macro - How to compare numerical values with non-numeric value 'Hyphens'
How to check in XTRF Macros when value is a whole number or with decimal places and/or non-numeric values exists such as hyphens.
Example 1: Quote Value can be 0
Example 2: Quote Value can be 0.00
Example 3: Quote Value can be -
Effective way of marking multiple tasks as not invoiceable
How to add language-independent tasks to a Classic project via API?
In the documentation for /projects/{projectId}/tasks it is specified that languageCombination is a required field, but what if there isn't one and I need to add a language-independent task?
A question for some group-think... Has anyone effectively used XTRF to track referrals?
We're trying to think about how to track referrals better and would love to use XTRF if that's possible. Has anyone done this effectively who is willing to share what they've done?
Thanks!
when i try to connect to a database using macro I get invalid address error
I try to connect to a database using xtrf macros and I get this error
invalid database address: jdbc:mysql://"HostIp:PortNumber"/"db name"
this is the code I am trying to connect to db with
try {
String url = "jdbc:mysql://host:port/"
String db = "database name"
String userName = "username"
String password = "password"
Connection conn = DriverManager.getConnection(url + db,userName,password)}
catch(Exception e){
return e.getMessage()
}
however the same code works fine on my machine when I try it on Intellij, is there something missing in my code ?
How to send emails to users using the logged in admin email with macro
I want to create a macro that sends emails to users, the sender is the already logged in admin email and the recipients are the selected users i want. what class should I be using in order to achieve that ?
Delayed Receivables and Payables on Cash Flow Report
Can anyone tell me where the amounts for Delayed Receivables and Delayed Payables come from on the Cash Flow report? I'm guessing they are receivables or payables that haven't been invoiced yet, but I don't have any support for this idea and can't find anything in the documentation. Also, I'm seeing two lines for each of these categories where I'd expect them to be all summarized together. Any information would be helpful!
I have a macro that checks a condition and I want it to mail the output to a static mail
My macro works just fine but I don't know how to make it send an email if the condition is true, can't seem to find the class responsible for sending emails and SendingEmailService seem to crash my macro , any help is appreciated.
thanks in advance.
Changing Client's Name in Smart Projects after creation using Macros
Hello , I am trying to change the client name after creating the smart project but it only changes from the outside not from the inside of the project dashboard
is there anyway I can change it in both places ? I tried to setNameInternal and it didnt work aswell
here is my code
import com.radzisz.xtrf.utils.velocity.VelocityTagUtils import com.radzisz.xtrf.model.project.Project import com.radzisz.xtrf.service.CustomerService import com.radzisz.xtrf.model.partner.customer.Customer class ChangeClient { def list; def params; VelocityTagUtils utils = new VelocityTagUtils(); ChangeClient(list, params){ this.list = list; this.params = params; } CustomerService customers = utils.getService("com.radzisz.xtrf.service.CustomerService") Customer newCustomer = customers.getByName("DTest2") def nameOfNewCustomer = newCustomer.getName() def runMacro() { String customerName list.each{Project project -> project.setCustomerInternal(newCustomer) project.getCustomer().setNameInternal(nameOfNewCustomer) } } } new ChangeClient(list, params).runMacro();
Customer support service by UserEcho