You need to sign in to do that
Don't have an account?
SFDC Dummy
Data saved In respective Series.....
Hi all
Thanks In Advc..
I am facing small bit of problem like want to data catagory in the form of series like
aaa,bbb,ccc,ddd---Series1
eee,fff,ggg,iii-----Series2......Like this
i have one object having some field .when i am entering value with field aaa and click on save it will be saved in series1 catagory means data will be saved with respective series based on value..
Is there any way to solve this
Thanks In Advc..
I am facing small bit of problem like want to data catagory in the form of series like
aaa,bbb,ccc,ddd---Series1
eee,fff,ggg,iii-----Series2......Like this
i have one object having some field .when i am entering value with field aaa and click on save it will be saved in series1 catagory means data will be saved with respective series based on value..
Is there any way to solve this
Hello,
You need to auto populate category field based on one field of record which is going to be inserted/updated.
You can create a apex trigger on inserted/updated object. Lets suppose you have account object. Trigger and TriggerHandler class are below.
Need to update coode for your object and field api names, since here I have used "Account" object and "YOUR_FIELD__C" field.
Apex Trigger
Apex Class
Thanks & Cheers,
Jigar(pateljb90@gmail.com)
All Answers
Hello,
You need to auto populate category field based on one field of record which is going to be inserted/updated.
You can create a apex trigger on inserted/updated object. Lets suppose you have account object. Trigger and TriggerHandler class are below.
Need to update coode for your object and field api names, since here I have used "Account" object and "YOUR_FIELD__C" field.
Apex Trigger
Apex Class
Thanks & Cheers,
Jigar(pateljb90@gmail.com)
Hello,
Ok, So for that you can create custom settings. Hope you aware with custom settings and create custom setting records.
Create custom setting like "CategoryDetails" with one custom field for series data like "Series Data"(Text Field)
And client can enter Category name as name field of that custom setting record, as well comma separated data in "Series Data" field.
Sample Records
(1) Category: SERIES 1, Series Data: ,aaaaa,bbbbb,ccccc,ddddd,
(2) Category: SERIES 2, Series Dat: ,eeeee,fffff,ggggg,hhhhh,
In Series data field, we must need to add ","(comma) at first and last character to exact matching in apex code.
Now we are using custom setting records, no need to prepare hardcode map in apex code.
In that case apex class will be like below.
Thanks & Cheers,
Jigar(pateljb90@gmail.com)
Hello,
The only way is that you need to create more text fields, and concate those fields in apex code before comparing it with category value
Below are the details.
Suppose you have created one more text field in custom settings "Series Data 1(Series_Data_1__c)"
Sample Records
(1) Category: SERIES 1, Series Data: ,aaaaa,bbbbb,ccccc,ddddd, , Series Data 1: ,1111,2222,3333,
(2) Category: SERIES 2, Series Dat: ,eeeee,fffff,ggggg,hhhhh, , Series Data 1: ,4444,5555,6666,
Below is apex code updates.
Thanks & Cheers,
Jigar(pateljb90@gmail.com)