• hemant rana
  • NEWBIE
  • 60 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 24
    Replies
I had a website http://mywebsite.com and want to display in iframe but its showing just blank white page. please help
<apex:iframe src="http://mywebsite.com" />
hi here is my VF code-------------------
<apex:pageBlock >
      
        <apex:pageBlockTable value="{!wrpR}" var="proR" id="RadioP">
            <apex:column >
                <apex:facet name="header"></apex:facet>
        <!--  <apex:selectRadio value="{!proR.obj.id}" label="Radio">
            <apex:selectOptions value="{!Hi}"/>
                </apex:selectRadio>-->
                      <input type="radio" name="group1" id="{!proR.isSelected}"/> <!--id="{!proR.obj.Id}"-->
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    Financial Product
                </apex:facet>
                <apex:outputtext value="{!proR.obj.Name}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    Term
                </apex:facet>
                <apex:inputField value="{!proR.obj.Term__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    Frequency
                </apex:facet>
                <apex:inputField value="{!proR.obj.Frequency__c}"/>
            </apex:column>
           
        </apex:pageBlockTable>
        <apex:pageBlockButtons location="bottom" style="float:right;">
         <apex:commandButton onclick="getSelectedContact(group1);" value="next" id="btn3" reRender="form"/>
        <apex:actionFunction name="next" action="{!next}" rerender="Msgs">
            <apex:param name="selected" value=""/>
        </apex:actionFunction>
        </apex:pageBlockButtons>
    </apex:pageBlock>
  
    </apex:form>
    <script>
        function getSelectedContact(group1)
        {
          
            var theRadioButtonSet = document.getElementsByTagName('input');
           for (var i = 0; i < theRadioButtonSet.length; i++) {
            var node = theRadioButtonSet[i];
            if (node.getAttribute('type') == 'radio') {
                  if(node.checked)
                  {
                     // alert(node.value);
                      var IsonOrNot=node.value;
                      callToSetSelectedFields(IsonOrNot);
                  }
                }
        }
        }
    </script>

And here is my controller wrapper class------------------

public class Account_Search_Controller
{
public List<SelectedRecordWrapperRadio> wrpR {get;set;}
public Account_Search_Controller()
{
wrpR=new List<SelectedRecordWrapperRadio>();
for(Pricing__c PP:p)
{
        wrpR.add(new SelectedRecordWrapperRadio(PP));
 }
}
public class SelectedRecordWrapperRadio
    {    
        public Pricing__c obj{get;set;}
        public boolean isSelected{get;set;}
        public SelectedRecordWrapperRadio(Pricing__c s)
        {  
            this.obj=s;
            isSelected=false;
            if(isSelected==true){
            system.debug('its selected');
            }
        }
    }
}

i basically want when a radio button is selected its value is passed to a controller...... please help.... I am not able to do it..... i am new to wrapper and vf..............
I had done integration with linkedin everything is fine. but everytime i have to login from linkedin if i signout out from salesforce. is their a way that the linkedin page remains open everytime?
hi i have a requirement where at the end of every month a field is set to 0 by itself.
I think about workflow but in worflow i have to create or edit a record then only workflow will fire.
So, please help.
As a recordlist is inserted through controller through insert command. Everytime a record is inserted in that list a mess should be displayed on vf page like say-----------------


in recordlist there is 3 record-
1) Hemant
2) sumit
3) Vishal

As hemant is inserted on vf it shows 1 record inserted
then when sumit is inserted it shows 2 record inserted
and at last 3 record insreted.................

is their any way plz help
Any how can we get the count of all validation rules and workflows  in salesforce org.
I tried---
private static MetadataService.MetadataPort createService()
    {
        MetadataService.MetadataPort service = new MetadataService.MetadataPort();
        service.SessionHeader = new MetadataService.SessionHeader_element();
        service.SessionHeader.sessionId = UserInfo.getSessionId();
        return service;    
    }
MetadataService.MetadataPort service = createService();
        List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();     
        MetadataService.ListMetadataQuery queryWorkflow = new MetadataService.ListMetadataQuery();
        queryWorkflow.type_x = 'Workflow';
        queriesWorkflow.add(queryWorkflow);

But no luck plz help its urgent
I have a requirement in which when a record is created manually say on an object "customObject__c" a record is also cretaed on the "opportunity" object . I have done this by trigger. Now they want to create and also redirect the page to the newly created opportunity record edit page?? is it possible to add some code in trigger as i thought to use page reference but that dosenot seems to work. please help... 

This is my trigger---
trigger TriggerOnEngagementForCreatingNewOportunity on Engagement__c (after insert) {
    set<id> engIds=new set<id>();
    set<string> engIdscontact=new set<string>();
    string urls;
    map<id,id> contactAccount=new map<id,id>();
    map<id,id> engagementcontact=new map<id,id>();
    map<id,id> engagementAccount=new map<id,id>();
    List<Opportunity> comms = new List<Opportunity>();
    list<engagement__c> ab=[select Contact_Name__r.Account.Id,Contact_Name__r.Name from engagement__c where Id=:trigger.new];
    for(engagement__c abc:ab)
    {
      engIds.add(abc.Contact_Name__r.Account.Id) ;
        engIdscontact.add(abc.Contact_Name__r.Name);
    }
     
    for(Engagement__c a : trigger.new)
    {
      
       Opportunity comm = new Opportunity ();
        for(Id ii:engIds)
        {
        comm.AccountId=ii;
        }
        for(String ss: engIdscontact)
        {
        comm.Name=ss;
        }
        comm.Contact__c=a.Contact_Name__c;
        comm.CloseDate=system.today();
       
        comm.StageName='Q4 2015';
        comm.Engagement__c=a.Id;
       comms.add(comm);     
    }
    insert comms;
    for(Opportunity opppp: comms)
    urls='https://cs8.salesforce.com/'+opppp.id+'/e?retURL=%2F'+opppp.id;
    public PageReference redirec()
    {
    system.debug('inside page reference');
    PageReference pageAccount = new PageReference('https://cs8.salesforce.com/006L0000005KSS2/e?retURL=%2F006L0000005KSS2');
    pageAccount.setRedirect(true);
    return pageAccount;
    }
}
Hi can we add new custom buttons in the campaign member view when clicked on add new members... like thisUser-added image
I want to remove the campaign member status picklist. is their any way please help...
hi when iam writing simple query---
{select Next_Contact_Date__c , Contact_Name__r.name from engagement__c where  Campaign__r.id=:cId AND Next_Contact_Date__c>=:system.today() ORDER BY Next_Contact_Date__c ASC}

It's working fine but due to some reasons i had to make it dynamic but after making it dynamic it's giving error i think may be of system.today()---

queryString = 'select Next_Contact_Date__c , Contact_Name__r.name from engagement__c where  Campaign__r.id='+'\''+cId+'\'' + ' AND Next_Contact_Date__c>=:' + system.today() + ' ORDER BY Next_Contact_Date__c ASC';

please help i tried every thing from converting string to date format any everything
Hi have made a vf page and a custom button on campaign members. when i click on the cutom button i had given the function of executing javascript.

window.open('https://c.cs8.visual.force.com/apex/Mobiles?id={!Campaign.Id}','','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');

its opening the new window but i want to open it in new tab. Please help
i had made a vf standard controller page. its having outputfield with inline editing. when iam using this vf page inside Force.com sites pages its not enabling inlineediting. please help its urgent
i have a vf page in which iam having a image on the click of which a new small window gets open of another vf page their is a button i want on the click of that a value on my picklist pass to the same previous page i had used page reference but on the click of that button its opening another page but i want it closes that page and then it gets back to the previous page plz helpo its urgent...
hi i have two fields-
"Days Needed"-- Manual Entry
"Days Remaining"-- Should be a formula field in which when each day passes it subtract 1 from "Days Needed" and populate the value and stop when it is 0.
  let say "Days Needed" field has value-2 and today is 30th . on 31st the value in "Days Remaining" should be-1 and on 1st value on "Days Remaining" should be 0;
I have apex column to display the formula field on visualforce page.
I am rendering the page on submit of the record and then displaying the newly created record.
But issue is formula field value is displaying blank in the results section.
Whereas if i go to record detail page I see the value but not on the vf page.
I have created a dynamic soql in controller but while using it with IN operator its not showing the query properly....
<apex:page controller="dynamicsoql">
    <apex:form>
        <apex:pageBlock >
            <apex:pageBlockSection id="pbs">
                <apex:outputText>{!idinlist}</apex:outputText>
                <apex:inputTextarea value="{!query}" />
            </apex:pageBlockSection>
            <apex:commandButton action="{!showid}" value="showid" reRender="pbs"/>
            <apex:commandButton action="{!showquery}" value="showquery" reRender="pbs"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>
.........................................................................
public class dynamicsoql {
    public list<j__c> recordid { get; set; }
    public string singleid{get;set;}
    public list<string> idinlist{get;set;}
    public string query {get;set;}
    public dynamicsoql()
    {
     recordid=[select id from j__c];
     idinlist=new list<string>();
    }
    public void showid()
    {
        for(j__c j: recordid)
        {
            singleid='\''+string.valueOf(j.id)+'\'';
            idinlist.add(singleid);
        }
    }
    public void showquery()
    {
        query ='select name from j__c where id in '+  idinlist ;
    }
}

In my controller their is a dynamic soql query----

(((((((((((query ='select name from j__c where id in '+  idinlist ;))))))))))))))))

in this query ""idinlist"" is a list of id's. If in the list their are only 10 id then its fine and the query is printed in the vf page in this form
select name from j__c where id in ('a019000000FRJDkAAP', 'a019000000FRJDzAAP', 'a019000000FRJEdAAP', 'a019000000FRJEeAAP', 'a019000000FRJFCAA5', 'a019000000FRJFDAA5', 'a019000000FRJFEAA5', 'a019000000FRJFFAA5', 'a019000000FRJFlAAP', 'a019000000FRJGSAA5')

but if  ""idinlist"" has more then 10 id's then its query is printed in this form

select name from j__c where id in ('a019000000FRJDkAAP', 'a019000000FRJDzAAP', 'a019000000FRJEdAAP', 'a019000000FRJEeAAP', 'a019000000FRJFCAA5', 'a019000000FRJFDAA5', 'a019000000FRJFEAA5', 'a019000000FRJFFAA5', 'a019000000FRJFlAAP', 'a019000000FRJGSAA5',...)

means after 10th id it's just showing '''...''' and no id. i had printed the query in vf page system debug every where it's the same.
and because of that my query is not working. Please help.


hi i have a requirement where at the end of every month a field is set to 0 by itself.
I think about workflow but in worflow i have to create or edit a record then only workflow will fire.
So, please help.
As a recordlist is inserted through controller through insert command. Everytime a record is inserted in that list a mess should be displayed on vf page like say-----------------


in recordlist there is 3 record-
1) Hemant
2) sumit
3) Vishal

As hemant is inserted on vf it shows 1 record inserted
then when sumit is inserted it shows 2 record inserted
and at last 3 record insreted.................

is their any way plz help
Any how can we get the count of all validation rules and workflows  in salesforce org.
I tried---
private static MetadataService.MetadataPort createService()
    {
        MetadataService.MetadataPort service = new MetadataService.MetadataPort();
        service.SessionHeader = new MetadataService.SessionHeader_element();
        service.SessionHeader.sessionId = UserInfo.getSessionId();
        return service;    
    }
MetadataService.MetadataPort service = createService();
        List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();     
        MetadataService.ListMetadataQuery queryWorkflow = new MetadataService.ListMetadataQuery();
        queryWorkflow.type_x = 'Workflow';
        queriesWorkflow.add(queryWorkflow);

But no luck plz help its urgent
I have a requirement in which when a record is created manually say on an object "customObject__c" a record is also cretaed on the "opportunity" object . I have done this by trigger. Now they want to create and also redirect the page to the newly created opportunity record edit page?? is it possible to add some code in trigger as i thought to use page reference but that dosenot seems to work. please help... 

This is my trigger---
trigger TriggerOnEngagementForCreatingNewOportunity on Engagement__c (after insert) {
    set<id> engIds=new set<id>();
    set<string> engIdscontact=new set<string>();
    string urls;
    map<id,id> contactAccount=new map<id,id>();
    map<id,id> engagementcontact=new map<id,id>();
    map<id,id> engagementAccount=new map<id,id>();
    List<Opportunity> comms = new List<Opportunity>();
    list<engagement__c> ab=[select Contact_Name__r.Account.Id,Contact_Name__r.Name from engagement__c where Id=:trigger.new];
    for(engagement__c abc:ab)
    {
      engIds.add(abc.Contact_Name__r.Account.Id) ;
        engIdscontact.add(abc.Contact_Name__r.Name);
    }
     
    for(Engagement__c a : trigger.new)
    {
      
       Opportunity comm = new Opportunity ();
        for(Id ii:engIds)
        {
        comm.AccountId=ii;
        }
        for(String ss: engIdscontact)
        {
        comm.Name=ss;
        }
        comm.Contact__c=a.Contact_Name__c;
        comm.CloseDate=system.today();
       
        comm.StageName='Q4 2015';
        comm.Engagement__c=a.Id;
       comms.add(comm);     
    }
    insert comms;
    for(Opportunity opppp: comms)
    urls='https://cs8.salesforce.com/'+opppp.id+'/e?retURL=%2F'+opppp.id;
    public PageReference redirec()
    {
    system.debug('inside page reference');
    PageReference pageAccount = new PageReference('https://cs8.salesforce.com/006L0000005KSS2/e?retURL=%2F006L0000005KSS2');
    pageAccount.setRedirect(true);
    return pageAccount;
    }
}
Hi can we add new custom buttons in the campaign member view when clicked on add new members... like thisUser-added image
I want to remove the campaign member status picklist. is their any way please help...
PLEASE HELP - I am trying to create a new Opportunity but I keep getting this error message:

Error: Invalid Data. Review all error messages below to correct your data. Apex trigger trg_Opportunity caused an unexpected exception, contact your administrator: trg_Opportunity: execution of BeforeInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Trigger.trg_Opportunity: line 15, column 1

...I was told that it has to do with an APEX trigger that I have set. I do not know how to go about turning off the APEX trigger or if there is something I can modify to allow the creation of manual Opportunities.

Please Advise.

Jerrad
Hi have made a vf page and a custom button on campaign members. when i click on the cutom button i had given the function of executing javascript.

window.open('https://c.cs8.visual.force.com/apex/Mobiles?id={!Campaign.Id}','','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');

its opening the new window but i want to open it in new tab. Please help
hi i have two fields-
"Days Needed"-- Manual Entry
"Days Remaining"-- Should be a formula field in which when each day passes it subtract 1 from "Days Needed" and populate the value and stop when it is 0.
  let say "Days Needed" field has value-2 and today is 30th . on 31st the value in "Days Remaining" should be-1 and on 1st value on "Days Remaining" should be 0;
<apex:column headerValue="Weekdays" headerClass="clsCenter">
                    {!dayslst.Day}----------------------------------------> CAN WE MAKE ANY STYLE OR CSS TO PUT THIS TEXT IN THE MIDDLE OF COLUMn IN PAGEBLOCK TABLE
                </apex:column>
                <apex:column headerValue="Start" headerClass="clsCenter">
                <span style="color:red; font-weight: bold ; vertical-align:Center ; horizontal-align:Center">
                    <apex:outputField value="{!timesheet[dayWithApiname[dayslst.Day]]}">--------------------->>>> CAN WE MAKE ANY STYLE OR CSS TO PUT THIS FIELD IN THE MIDDLE OF COLUMn IN PAGEBLOCK TABLE
                        <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
                    </apex:outputField> 
                     </span>
                </apex:column>
I have created a dynamic soql in controller but while using it with IN operator its not showing the query properly....
<apex:page controller="dynamicsoql">
    <apex:form>
        <apex:pageBlock >
            <apex:pageBlockSection id="pbs">
                <apex:outputText>{!idinlist}</apex:outputText>
                <apex:inputTextarea value="{!query}" />
            </apex:pageBlockSection>
            <apex:commandButton action="{!showid}" value="showid" reRender="pbs"/>
            <apex:commandButton action="{!showquery}" value="showquery" reRender="pbs"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>
.........................................................................
public class dynamicsoql {
    public list<j__c> recordid { get; set; }
    public string singleid{get;set;}
    public list<string> idinlist{get;set;}
    public string query {get;set;}
    public dynamicsoql()
    {
     recordid=[select id from j__c];
     idinlist=new list<string>();
    }
    public void showid()
    {
        for(j__c j: recordid)
        {
            singleid='\''+string.valueOf(j.id)+'\'';
            idinlist.add(singleid);
        }
    }
    public void showquery()
    {
        query ='select name from j__c where id in '+  idinlist ;
    }
}

In my controller their is a dynamic soql query----

(((((((((((query ='select name from j__c where id in '+  idinlist ;))))))))))))))))

in this query ""idinlist"" is a list of id's. If in the list their are only 10 id then its fine and the query is printed in the vf page in this form
select name from j__c where id in ('a019000000FRJDkAAP', 'a019000000FRJDzAAP', 'a019000000FRJEdAAP', 'a019000000FRJEeAAP', 'a019000000FRJFCAA5', 'a019000000FRJFDAA5', 'a019000000FRJFEAA5', 'a019000000FRJFFAA5', 'a019000000FRJFlAAP', 'a019000000FRJGSAA5')

but if  ""idinlist"" has more then 10 id's then its query is printed in this form

select name from j__c where id in ('a019000000FRJDkAAP', 'a019000000FRJDzAAP', 'a019000000FRJEdAAP', 'a019000000FRJEeAAP', 'a019000000FRJFCAA5', 'a019000000FRJFDAA5', 'a019000000FRJFEAA5', 'a019000000FRJFFAA5', 'a019000000FRJFlAAP', 'a019000000FRJGSAA5',...)

means after 10th id it's just showing '''...''' and no id. i had printed the query in vf page system debug every where it's the same.
and because of that my query is not working. Please help.


i want to repeat a pageblocksection in a vf page so that the title should change dynamically account to the values {get;set;} in controller.....
plz help.......

<apex:repeat values="DON'T KNOW WHAT TO PUT IN THIS PLACE">
<apex:pageBlockSection title="{!heading}">
            <Apex:repeat value="{!textvalues}" var="tv">
            {!tv}
            </Apex:repeat>
            </apex:pageBlockSection>
</repeat>
please help....
I am trying to create a new lead from inside an Apex Controller. For test purposes, I am simply running the following code:

insert new Lead(LastName='Smite', Company='Acme');

This works fine when run from an execure anonymous window, but when it runs in my controller I always get:

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, invalid parameter value: []
Error is in expression '{!createLead}' in component <apex:commandButton> in page prospects

Why would this be happending? I have no triggers or workflows defined. 

Any help is greatly appreciated.