0
votes

I have created a mapping inside Informatica cloud where source is salesforce and I am fetching data from salesforce using SOQL query. I have the following where condition written in SOQL Filter condition.

abc='test' AND YearField__c= (System.Today().year())

When I try to run the task, it gives me the error 'Bind variables only allowed in Apex code'. How do I use the current year function in SOQL query?

Thanks

1
I tried using YearField__c= THIS_YEAR as per this link. That does not seem to work either: biswajeetsamal.com/blog/date-literals-in-salesforce-soqlAnonymous
Nevermind, I noticed the field I was using to compare with in SF was a picklist text field. Once I converted it into date format and then used it to compare with THIS_YEAR , it seemed to work.Anonymous

1 Answers

0
votes

you can use the SQL task in Informatica mapping right after source task and write your sql query with a where clause at the end ( where xyz > ?parameter/field from previous source task or sql function ?