You need to sign in to do that
Don't have an account?
Rishav Dutta 12
I need help in the below apex code.
Hello, I am new to Apex coding... So am having some issues with syntax.
Variables declared:
String Attribute10__c='Sample String 1';
String Attribute1__c='Sample String 2';
String Attribute3__c='Sample String 3';
String subject__c=''Sample String 4;
String Attribute11__c;
Integer cal_length;
Integer no_of_chars_from_case_tittle;
String case_tittle_length;
Logic to be implemented:
cal_length = 50 + Attribute10__c.length()+ Attribute1__c.length() + Attribute3__c.length();
case_tittle_length = subject__c.length();
if (case_tittle_length <= 140-cal_length )
no_of_chars_from_case_tittle = case_tittle_length ;
else
no_of_chars_from_case_tittle = 140-cal_length ;
Attribute11__c = subject__c.substring(0, no_of_chars_from_case_tittle);
I need help in constructing a apex code that I can execute in Workbench. I would like to get the values of Attribute11 and no_of_chars_from_case_tittle through system debug. Can anyone please help?
Variables declared:
String Attribute10__c='Sample String 1';
String Attribute1__c='Sample String 2';
String Attribute3__c='Sample String 3';
String subject__c=''Sample String 4;
String Attribute11__c;
Integer cal_length;
Integer no_of_chars_from_case_tittle;
String case_tittle_length;
Logic to be implemented:
cal_length = 50 + Attribute10__c.length()+ Attribute1__c.length() + Attribute3__c.length();
case_tittle_length = subject__c.length();
if (case_tittle_length <= 140-cal_length )
no_of_chars_from_case_tittle = case_tittle_length ;
else
no_of_chars_from_case_tittle = 140-cal_length ;
Attribute11__c = subject__c.substring(0, no_of_chars_from_case_tittle);
I need help in constructing a apex code that I can execute in Workbench. I would like to get the values of Attribute11 and no_of_chars_from_case_tittle through system debug. Can anyone please help?
Check this...
All Answers
Check this...
COMPILE ERROR: Invalid identifier: Attribute10__c
LINE: 1 COLUMN: 8
Try this it works.....