• Priyanka Reddy 74
  • NEWBIE
  • 35 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 8
    Replies
Hi All,
Im trying to complete advance billing speciaiist bacth, im stucked in step 2 , can someone help me to know how to create finace period for 36 months?
User-added image
Challenge Not yet complete... here's what's wrong:
We couldn't find 36 Finance Period records associated with UMS US Accounting Finance Book and with UMS US Legal Entity. Please double-check if all the 36 records exist and they contain the correct information for Finance Book, Finance Period Legal Entity, and Period Type, according to the requirements.
Hi All,

Im unable to make date feild null can some one suggest me how we can do that.
 
string date = 'Sat Apr 04 00:00:00 GMT 2020';

string dddd= null;

 Date myDate = date.valueOf(dddd);
 system.debug('mydate ::'+myDate);
 

updateAccount.SLAExpirationDate__c  = myDate;

Thank you.
Hi All,

I have created button which calls javascript method and from script passing arguments to apex:actionFunction. 

actionFunction invokes apex controller method.

once i click on button it generating 2 logs. 
User-added image
among this 2 logs only one log contains debug statement.

VF code:
 
<apex:actionFunction action="{!split}" name="methodOneInJavascript2" reRender="resultofjs"  >
            <apex:param name="selectedStringValues"   assignTo="{!selectedStringValues}"  value="" /> 
            <apex:param name="selectedDoubleValues"   assignTo="{!selectedDoubleValues}"  value="" />
            <apex:param name="selectedIntegerValues"  assignTo="{!selectedIntegerValues}"  value="" />
        </apex:actionFunction>



<script>
function test(){
        var list=' ';
        var list2=' ';
        var list3=' ';
        var i,j,k;
        for(i=1;i<={!stringsize};i++){
            if(document.getElementById(i).checked == true){
                list += document.getElementById(i).value + '#';
                
            }
        }
        for(j={!stringsize+1};j<={!doublesize};j++){
            if(document.getElementById(j).checked == true){
                list2 += document.getElementById(j).value + '#';
            }
        }
        for(k={!doublesize+1};k<={!integersize};k++){
            if(document.getElementById(k).checked == true){
                list3 += document.getElementById(k).value + '#';
            }
        }
        methodOneInJavascript2(list,list2,list3);       
    }
</script

Apex: Controller
public void test(){
        system.debug('selectedStringValues'+selectedStringValues);
    }


Can someone please help me why it is calling 2 times.
If you want to debug logs do let me know I'll share if required.

Thank you.
 
Hi All,

I have a List<String> values and i want to convert it into List<Double> or decimal.
 
string s1 = '100,22,5'; 

List<String> splitDoubleValues = s1.split(',');
List<Double> doubleList = new List<Double>();
            for(Integer i=0;i<splitDoubleValues.size();i++){
              doubleList.add(decimal.valueOf(splitDoubleValues[i]));
                system.debug('doubleList :'+doubleList);
                //selectedList3.put(doubleFeilds[i],doubleList[i]);		
            }


Can some one suggest how to convert it.

Thank you.
Hi All,

Im trying to retrive only Double datatype feilds from Schema.DescribeFieldResult can some one suggest how to filter based on feild datatype and store feild names in list.
String editableFields =' ';
List<String> allFieldName = new List<String>();

Map<String, Schema.SobjectField> allMap = Schema.SobjectType.Account.fields.getMap();
        for(Schema.SobjectField field : allMap.values())
        {  
            Schema.DescribeFieldResult dfr = field.getDescribe();
            if(dfr.isCreateable() && dfr.isUpdateable() ){
                allFieldName.add(dfr.getName());                   
                editableFields += ','+ dfr.getName();
                 system.debug(dfr.getName() +' : '+ dfr.getType());
                    
                }
        }

Thank you.
 Hi All,

I'm having a field set which contains fields of records which include both editable and non editable, can some one suggest me like how I can make retrieve separately both editable and non editable fields.
 
fieldList = new List<String>(); 
        for(Schema.FieldSetMember memberObj : SObjectType.Account.FieldSets.rakch__DemoFieldSet.getFields()){
            qwerty += ','+memberObj.getFieldPath();
            fieldList.add(memberObj.getFieldPath());
        }



Thank you in Advance.
Hi All,

VF:
<apex:pageBlock>
<table>
<apex:repeat value="{!accList2}" var="a" >
<tr>
<apex:repeat value="{!a}" var="am">
<td> {!am.id} </td> 
<td> <input type="radio" name="radio1" id=""  value="{!am.name}"  onclick="test()" /> {!am.name}  </td>
<td> <input type="radio" name="radio2" id=""  value="{!am.phone}" onclick="test()" /> {!am.phone} </td>
</apex:repeat>   </tr>
</apex:repeat>
</table>
</apex:pageBlock>

Apex:
Public List<String> selectedFieldValues {get;set;}

accList2 =[select id,name,phone,billingcity from acount where id IN: idList];

User-added image
Basically I'm trying to get the selected radio button values to apex controller and store in List and then update account fields using visual force page similar to standard functionality.

Can someone please suggest me how to achieve this functionality usinf vf and apex.

Thank you,
Priyanaka.
 
for(Schema.FieldSetMember memberObj : SObjectType.Account.FieldSets.rakch__DemoFieldSet.getFields()){
            qwerty += ','+memberObj.getFieldPath();
        }       

 string id1 = IdList.get(0);
        string id2 = IdList.get(1);

        string query1 = qwerty+' from Account where id=' +id1;
        accList2=Database.query(query1);

Im trying to concate id with query but im getting, can some one let me know where i was going wrong.

ERROR: System.QueryException: unexpected token: w00000LEFtiAAH
Hi,

I want to pass id for radio button dynamically in iteration, can some one suggest how to do that.

<apex:repeat value="{!am.names}" var="n"> 
<td> 
<input type="radio" name="radio1" id="{!n}"  value="{!n}" onclick="test()"/> 
{!n}      
</td>
</apex:repeat>

Thank you.
Priyanka
Hi,
Im trying to pass values from vf page to apex controller on selecting radio button can any one help me why values are not passing and what wrong i made.
 
public static string checkedname{get;set;}    
public void getSelectedInfo(){
        system.debug('Selected name  '+checkedname);
    }
 
<apex:repeat value="{!am.names}" var="n"> 
   <td> 
     <input type="radio" name="name"  value="{!n}"/> 
        <apex:actionsupport event="onclick" action="{!getSelectedInfo}">
            <apex:param assignTo="{!checkedname}" name="checkedname" value="{!n}" />
         </apex:actionsupport>
           {!n} 
    </td>
</apex:repeat>

Thanks in advance
Hi All,

Im unable to make date feild null can some one suggest me how we can do that.
 
string date = 'Sat Apr 04 00:00:00 GMT 2020';

string dddd= null;

 Date myDate = date.valueOf(dddd);
 system.debug('mydate ::'+myDate);
 

updateAccount.SLAExpirationDate__c  = myDate;

Thank you.
Hi All,

I have created button which calls javascript method and from script passing arguments to apex:actionFunction. 

actionFunction invokes apex controller method.

once i click on button it generating 2 logs. 
User-added image
among this 2 logs only one log contains debug statement.

VF code:
 
<apex:actionFunction action="{!split}" name="methodOneInJavascript2" reRender="resultofjs"  >
            <apex:param name="selectedStringValues"   assignTo="{!selectedStringValues}"  value="" /> 
            <apex:param name="selectedDoubleValues"   assignTo="{!selectedDoubleValues}"  value="" />
            <apex:param name="selectedIntegerValues"  assignTo="{!selectedIntegerValues}"  value="" />
        </apex:actionFunction>



<script>
function test(){
        var list=' ';
        var list2=' ';
        var list3=' ';
        var i,j,k;
        for(i=1;i<={!stringsize};i++){
            if(document.getElementById(i).checked == true){
                list += document.getElementById(i).value + '#';
                
            }
        }
        for(j={!stringsize+1};j<={!doublesize};j++){
            if(document.getElementById(j).checked == true){
                list2 += document.getElementById(j).value + '#';
            }
        }
        for(k={!doublesize+1};k<={!integersize};k++){
            if(document.getElementById(k).checked == true){
                list3 += document.getElementById(k).value + '#';
            }
        }
        methodOneInJavascript2(list,list2,list3);       
    }
</script

Apex: Controller
public void test(){
        system.debug('selectedStringValues'+selectedStringValues);
    }


Can someone please help me why it is calling 2 times.
If you want to debug logs do let me know I'll share if required.

Thank you.
 
 Hi All,

I'm having a field set which contains fields of records which include both editable and non editable, can some one suggest me like how I can make retrieve separately both editable and non editable fields.
 
fieldList = new List<String>(); 
        for(Schema.FieldSetMember memberObj : SObjectType.Account.FieldSets.rakch__DemoFieldSet.getFields()){
            qwerty += ','+memberObj.getFieldPath();
            fieldList.add(memberObj.getFieldPath());
        }



Thank you in Advance.
for(Schema.FieldSetMember memberObj : SObjectType.Account.FieldSets.rakch__DemoFieldSet.getFields()){
            qwerty += ','+memberObj.getFieldPath();
        }       

 string id1 = IdList.get(0);
        string id2 = IdList.get(1);

        string query1 = qwerty+' from Account where id=' +id1;
        accList2=Database.query(query1);

Im trying to concate id with query but im getting, can some one let me know where i was going wrong.

ERROR: System.QueryException: unexpected token: w00000LEFtiAAH
Hi,

I want to pass id for radio button dynamically in iteration, can some one suggest how to do that.

<apex:repeat value="{!am.names}" var="n"> 
<td> 
<input type="radio" name="radio1" id="{!n}"  value="{!n}" onclick="test()"/> 
{!n}      
</td>
</apex:repeat>

Thank you.
Priyanka

Hi There,

 

Very new to visualforce here, so sorry if this is a dumb question.

 

I'm using the pageBlockTable tag to render a list of objects to the page. I want to make one of the columns hold an empty string that will be updated by some AJAX later on. In order to do that I want to add a unique ID to each one of these fields to reference it later. What I was hoping would work was:

 

 

   <apex:pageBlockTable value="{!RateCardPriceBreaks}" var="pb">
            <apex:column headerValue="Select" >
                <apex:commandButton action="{!getQuantity('test')}" value="Select"/>
            </apex:column>
            <apex:column headerValue="Product" value="{!pb.product__r.Name}" />
            <apex:column headerValue="Quantity" id="quantity" value="{!pb.ID}"/>
   </apex:pageBlockTable>

 

 

<apex:pageBlockTable value="{!RateCardPriceBreaks}" var="pb">                      
    <apex:column headerValue="Product" value="{!pb.product__r.Name}" />            
    <apex:column headerValue="Quantity" id="quantity{!pb.ID}" value=""/>  
</apex:pageBlockTable>
Error: Literal value is required for attribute id in <apex:column> at line 8 column 45

 

 

So that's obviously *not* the way to do it. Any tips?

 

TIA