• Mayank Deshpande 2
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
Hi 
Can anyone help me on this issue.

IF ({ISPICKVAL(Concert__c.Concert_Type__c , "Regular")},"https://c.ap4.visual.force.com/apex/concertbooking?sfdc.tabName=01r6F000000rqTQ")

error coming as enter url is invalid , i tried the same with google.com but showing same error .

 
Hi All,

 i have created one custom object Tickets and custom field Concert having master detail relationship 

while Saving VF page i am getting below error
The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores.    



<apex:page controller="Tickets__c">
  <apex:form>
  <apex:page>
  <apex:pageBlock>
 <apex:inputField value="{!Tickets__c.Concert__c}"/>    
  </apex:pageBlock>  
  </apex:page>  
  </apex:form>
</apex:page>
 
Hi All,
 
I am new in salesforce . i write a code to insert  a record in custome object and used system.debug to check the code .

Public Class inserrecordincampsite
{
Public Static Void InsertRecord()
{
Campsite__c Camp = new Campsite__c  (Name='Mayank',Description__c='xyz');
insert Camp;
system.debug('Record Inserted'  +Camp)
}}

after exeuction of code through anonymous window , debug message generated is blank and showing 0 DML operation performed.

can anyone suggest wht's wrong in code .
Hi ,

I write a apex class on task object which will insert a record.

Public class InsertTaskForDEMO {
 
 public static void newtask()
{ List<Task> ACCD  = new List<Task>();

for (Integer i=0; i<3; i++)
 {
 Task Act = new Task(Status='Not Started',Subject='Other');
   ACCD.add(Act);
   insert ACCD;
}}}

i want to call this newtask method in trigger made on custom object 

trigger checkpromotiondetails on Task (after insert)
{
for (Demo__c Task :trigger.new)
{ if (Demo__c.Eligible_for_Bouns__c = 'True')
{
InsertTaskForDEMO.newtask();
}
}}

while trying to same it is givning me error.

 
 i tried to search the contact using apex:action function and for that i define do query method . but it only refersh the page. how can we solve this.
I Create a VF page with below Code 

apex:page Controller="ContactNomineeController" showHeader="True">
<apex:image value="{!$Resource.Contact}" width="500" height="100"/>
<apex:form >
            <apex:actionFunction action="{doquery}" name="QueryContact" reRender="MyContact"/>
            
            <div class="filterDiv">
            <label>Filter By Last Name:</label>
                       <apex:inputText value="{!serachstring}"  onkeyup="apexDoQuery()"/>
                       </div>
 <apex:pageBlock title="Search Contact" id="MyContact">
 <apex:pageBlockButtons >
 <apex:commandButton value="save" action="{!save}"/> 
 </apex:pageBlockButtons>
 <apex:pageBlockTable value="{!ConList}" var="Con">
<apex:column value="{!Con.Name}"/>
  <apex:column value="{!Con.accountid}"/>
<apex:column headerValue="Email"> 
   <apex:inputField value="{!Con.email}" />
  </apex:column> 
 <apex:column value="{!Con.phone}"/> 
  <apex:column headerValue="Nominee"> 
   <apex:inputCheckbox value="{!Con.Nominee__c}" />
  </apex:column> 
 </apex:pageBlockTable>
 </apex:pageBlock>
 </apex:form>
</apex:page>

and Controller Class 

public with sharing class ContactNomineeController {
 Public List<Contact> ConList {get;set;}
 Public List<Contact> Contacts {get;set;}
 Public String serachstring {get;set;}
 Public ContactNomineeController (){
   serachstring='';
   doquery();
 }
  Public void doquery(){
 
 String querystring='';
 
 if (serachstring!= null)
 querystring = '%' +serachstring+ '%';
 
 ConList= [select id,accountid,name,email,phone,Nominee__C from Contact where lastname like :querystring LIMIT 10 ];
 }
 Public void save() {
 update ConList; }
 
}

Code saved but not able to search contact.
 
Need help to understand the loophole.
Hi 
Can anyone help me on this issue.

IF ({ISPICKVAL(Concert__c.Concert_Type__c , "Regular")},"https://c.ap4.visual.force.com/apex/concertbooking?sfdc.tabName=01r6F000000rqTQ")

error coming as enter url is invalid , i tried the same with google.com but showing same error .

 
Hi ,

I write a apex class on task object which will insert a record.

Public class InsertTaskForDEMO {
 
 public static void newtask()
{ List<Task> ACCD  = new List<Task>();

for (Integer i=0; i<3; i++)
 {
 Task Act = new Task(Status='Not Started',Subject='Other');
   ACCD.add(Act);
   insert ACCD;
}}}

i want to call this newtask method in trigger made on custom object 

trigger checkpromotiondetails on Task (after insert)
{
for (Demo__c Task :trigger.new)
{ if (Demo__c.Eligible_for_Bouns__c = 'True')
{
InsertTaskForDEMO.newtask();
}
}}

while trying to same it is givning me error.

 
I Create a VF page with below Code 

apex:page Controller="ContactNomineeController" showHeader="True">
<apex:image value="{!$Resource.Contact}" width="500" height="100"/>
<apex:form >
            <apex:actionFunction action="{doquery}" name="QueryContact" reRender="MyContact"/>
            
            <div class="filterDiv">
            <label>Filter By Last Name:</label>
                       <apex:inputText value="{!serachstring}"  onkeyup="apexDoQuery()"/>
                       </div>
 <apex:pageBlock title="Search Contact" id="MyContact">
 <apex:pageBlockButtons >
 <apex:commandButton value="save" action="{!save}"/> 
 </apex:pageBlockButtons>
 <apex:pageBlockTable value="{!ConList}" var="Con">
<apex:column value="{!Con.Name}"/>
  <apex:column value="{!Con.accountid}"/>
<apex:column headerValue="Email"> 
   <apex:inputField value="{!Con.email}" />
  </apex:column> 
 <apex:column value="{!Con.phone}"/> 
  <apex:column headerValue="Nominee"> 
   <apex:inputCheckbox value="{!Con.Nominee__c}" />
  </apex:column> 
 </apex:pageBlockTable>
 </apex:pageBlock>
 </apex:form>
</apex:page>

and Controller Class 

public with sharing class ContactNomineeController {
 Public List<Contact> ConList {get;set;}
 Public List<Contact> Contacts {get;set;}
 Public String serachstring {get;set;}
 Public ContactNomineeController (){
   serachstring='';
   doquery();
 }
  Public void doquery(){
 
 String querystring='';
 
 if (serachstring!= null)
 querystring = '%' +serachstring+ '%';
 
 ConList= [select id,accountid,name,email,phone,Nominee__C from Contact where lastname like :querystring LIMIT 10 ];
 }
 Public void save() {
 update ConList; }
 
}

Code saved but not able to search contact.
 
Need help to understand the loophole.