last day (19 days later) » 

7:00 AM
thanks for quick response
 
so
what is the issue you are facing?
 
actually this is first time i working on this thing so as you told me i can use describe()
 
yes
 
but the problem is how, with which field
 
you can use describe call to check fields if field is updatable or not
 
7:02 AM
public void createLogic(){

for(WrapperpaCaseList wa : waAccList)
{
if(wa.isUpdateable)
{
System.debug('---->>> is updatable');
}
else{
System.debug('---->>> is not updatable');

}


}
in this function i need to write the logic
 
hmm
one question
 
ya
 
in wrapper class case object is there
?
 
yes
public Case record {get;set;}
 
so
 
7:06 AM
actually on selecting "Case Field", "Value" i.e. textbox will be automatically come
ya tell me
 
why you took isUpdatable variable in wrapper class?
 
it was there in requirement
they want like that
actually if value is not accessible we need to provide a textbox
so that user can provide the value
so i have done that using---
<apex:inputField value="{!eachRecord.record[eachRecord.caseFieldSelected]}" rendered="{!casefieldEditablemap[eachRecord.caseFieldSelected]}" required="false" />

<apex:inputText value="{!eachRecord.forUneditable}" rendered="{!!casefieldEditablemap[eachRecord.caseFieldSelected]}" />
 
so why you want to look for each field property if that is Updatable or not?
use this code
Schema.DescribeSobjectResult resultObj = Account.SobjectType.getDescribe();

Map<String , Schema.SObjectField> mapFieldList = resultObj.fields.getMap();

for(Schema.SObjectField field : mapFieldList.values())
{
	Schema.DescribeFieldResult fieldResult = field.getDescribe();

	if(fieldResult.isUpdateable())
	{
		system.debug(fieldResult.getName());
	}
}
to check which field is updateable or not
 
because we are having two different text box since i need to put each row into the MAP--
public Map<Integer, String> filterMap = new Map<Integer, String>();
 
can you give a brief idea what you are trying to do?
it is not much clear
 
7:17 AM
without checking that whether the the field is updateable or not how i can get the value from text box, since according to updateable field we are having 2 text boxes so i need to fetch the value accordingly
ya
i'll tell u
i just wanted to get the each row value in my map--
 
 
where Integer will be serial number mentioned in snapshot, String will contain --- for example- concatenation of row i.e. Case Field + Operator + Value
public Map<Integer, String> filterMap = new Map<Integer, String>();
so when it comes to value
i need to check before putting in the map whether the field is updeatable or not
so that i can fetch the value from the correct text box
you know that if value is not updeatable then we will not get text box that's why i have put that text box
r u there ?
 
7:39 AM
I suggest in your picklist
just provide those fields which are updatable
 
bro it's not in my hand
they want the thing like this only
okay just tell me one thing
for(WrapperpaCaseList wa : waAccList)
{
if(wa.isUpdateable)
{
System.debug('---->>> is updatable');
}
here in if condition how i can check whether case field is updeatable
if possible can show me the syntax
caseFieldSelected.getDescribe().isUpdateable()
something like this
so that atleast i can enter in if condition only when the field is editable
 
so there are multiple fields on case
which field you want to consider for isUpdateable boolean
 
those are editable say , Account ID, Status
etc
Case id IS NOT EDITABLE
 
so if all the fields is updatable then only this boolean value will be true
 
7:55 AM
using for loop i m going row by row so if say -->> Status = New
then it should go inside the if condition
 
then use my above code
using that code you can check each and every field
accessibility
 
then if second row is CaseID which is un editable it will go to else part
okay
 
for every record describe result will be same
because describe call check for object and field access
not the record level access
 
okay
 
 
1 hour later…
9:27 AM
hey
that didn't work actually
so i have done something which is working but one more problem now i am facing
r u there ?
 

  last day (19 days later) »