function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anvesh@force.comanvesh@force.com 

Please solve the button code for below uRL?

I want to add if condition for below Opportunity button.  where Opportunity recordType is  'Flexy' then i have to  populate Task picklist field values as 'Flex'...if Opportunity recordType is 'Matue' then I have to populate Task picklist field value as 'Matue'. But when i added below If condition is getting syntax error.


/00T/e?who_id={!Contact.Id}&RecordType={!Task.RecordTypeId}&tsk6={!Opportunity.Description}&tsk1={!User.Name}&tsk13 = 'Normal'&00N40000002dXt2 = {!Opportunity.Product_Interest__c}&tsk3= {!Opportunity.Name}&tsk3_lkid ={!Opportunity.Id}&tsk4={!TODAY()}&{!IF(Opportunity.RecordTypeId=='012400000009mCC' ,  ISPICKVAL(!Task.Product_Type__c, 'VA') , NULL)}&tsk5={!Opportunity.Name}&retURL=%2F/006/o
Grazitti TeamGrazitti Team
Hi,

Exactly what error you are getting?
anvesh@force.comanvesh@force.com
Syntax error because i used {!Task.product_Intrest}  but i corrected as {Task.Product_Intrest}...now i am not getting any error. but  it was not displayuing any value in product intrest field in Task.
Grazitti TeamGrazitti Team
I guess you are picking up the wrong id to populate product interest field of task.