• arundev
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
I want to create a new Event Record On click Of custom Button(By passing some values).

When I am passing the values for creating the record its give an error in these fields EndDateTime,StartDateTime of Event Table.

And the error is-

{errors:{fields:EndDateTime,StartDateTime, message:'Event: bad field names on insert/update call: EndDateTime, StartDateTime', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', }, id:null, success:'false', }

 

I am inserting these values in Production system it gives above error.

But,When I am inserting the same values in our development system it didn't produces any error.

Code:-

I am using this java script-

 

var eEvent=new sforce.SObject("Event");

eEvent.OwnerId="{!SE_Request__c.OwnerId}";

eEvent.WhatId="{!SE_Request__c.Id}";

if("{!SE_Request__c.ContactId__c}" != "")

{

eEvent.WhoId ="{!SE_Request__c.ContactId__c}";

}

if("{!SE_Request__c.LeadId__c}" != "")

{

eEvent.WhoId ="{!SE_Request__c.LeadId__c}";

}

eEvent.Description="{!SE_Request__c.Description__c}";

eEvent.DurationInMinutes=60;

eEvent.ActivityDate=date("{!Today}");

eEvent.ActivityDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.StartDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.EndDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.ReminderDateTime=dateRem(my_time);

var result = sforce.connection.create([eEvent]);

var eEventAtt=new sforce.SObject("EventAttendee");

eEventAtt.AttendeeId="{!SE_Request__c.OwnerId}";

var resultAtt = sforce.connection.create([eEventAtt]);

 

 

it gives an error in this line(Red Line).

Error is –

{errors:{fields:EndDateTime,StartDateTime, message:'Event: bad field names on insert/update call: EndDateTime, StartDateTime', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', }, id:null, success:'false', }

  • September 29, 2008
  • Like
  • 0
hi,

I just want to call S-control on clicking of custom button on visualforce page.I want to create Orderline record and Assets onclicking on that custom button using S-control.

Please Help....

Hi,

I am creating a mail merge Template for Quote and Quotes Line Item. I have created the template, but when I am trying to use this template then only the Quote, Opportunity and Owner records are going to the mail merge generated document but the Quotes line Item records are not going to the mail merge document.

I have tried these syntax in my Word Template of Quote Line Items :-
«Quote_LineItem_Start»«PRODUCT_NAME»«Quote_LineItem_Qty_Ordered»
«Quote_LineItem_Sales_Discount»«Quote_LineItem_Ext_Net_Price»«Quote_LineItem_End»

But none of them worked. Please anyone who have successfully done that can help me. Any suggestions are welcome.

Thanks.
I'm creating an Apex class in which I need to read an Account Name slected by user. the issue is i am not able to find a way to read form field values. I know we can read the url parameters in Apex classes but i need to read the sleceted account name on the form in my apex code. can anyone help me achieve this? thanks.
hi,

when I am populating record from one page to another page using URL parameter and if there are some similar record are present in database for one field then it converts the textBox into the comboBox and gives the choice for selection......

For example:-I am passing account field record 'arunkumar' from opportunity page to order page and in account table there are two similar record but little difference are present like 'arunkumar' and 'arun kumar sahu'. So, when I am popluating records using URL parameter then in order form account textfield is converting into comboBox and giving me choisce but 'arunkumar' and 'arun kumar sahu' for selection.

Is there any way to disable this feature for a particular page or whole application. 

Please Help..
Hi,
When I am updating the ParentId in "CaseComment" with the another ParentId.Then I got an error:-
""Please check the security settings of this field and verify that it is read/write for your profile.', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', },""
And when I traced the error then I found a message "Check Modify date Premission for your profile in security setting".


   var cCase=new sforce.SObject("CaseComment");
       cCase.Id=SourceCaseCommentId;
       cCase.ParentId=TargetParentid;
     var result = sforce.connection.create([cCase]);


Please Help....
I want to create a new Event Record On click Of custom Button(By passing some values).

When I am passing the values for creating the record its give an error in these fields EndDateTime,StartDateTime of Event Table.

And the error is-

{errors:{fields:EndDateTime,StartDateTime, message:'Event: bad field names on insert/update call: EndDateTime, StartDateTime', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', }, id:null, success:'false', }

 

I am inserting these values in Production system it gives above error.

But,When I am inserting the same values in our development system it didn't produces any error.

Code:-

I am using this java script-

 

var eEvent=new sforce.SObject("Event");

eEvent.OwnerId="{!SE_Request__c.OwnerId}";

eEvent.WhatId="{!SE_Request__c.Id}";

if("{!SE_Request__c.ContactId__c}" != "")

{

eEvent.WhoId ="{!SE_Request__c.ContactId__c}";

}

if("{!SE_Request__c.LeadId__c}" != "")

{

eEvent.WhoId ="{!SE_Request__c.LeadId__c}";

}

eEvent.Description="{!SE_Request__c.Description__c}";

eEvent.DurationInMinutes=60;

eEvent.ActivityDate=date("{!Today}");

eEvent.ActivityDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.StartDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.EndDateTime=date("{!SE_Request__c.Preferred_Start_Date_Time__c}");

eEvent.ReminderDateTime=dateRem(my_time);

var result = sforce.connection.create([eEvent]);

var eEventAtt=new sforce.SObject("EventAttendee");

eEventAtt.AttendeeId="{!SE_Request__c.OwnerId}";

var resultAtt = sforce.connection.create([eEventAtt]);

 

 

it gives an error in this line(Red Line).

Error is –

{errors:{fields:EndDateTime,StartDateTime, message:'Event: bad field names on insert/update call: EndDateTime, StartDateTime', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', }, id:null, success:'false', }

  • September 29, 2008
  • Like
  • 0
Hi,

I am creating a mail merge Template for Quote and Quotes Line Item. I have created the template, but when I am trying to use this template then only the Quote, Opportunity and Owner records are going to the mail merge generated document but the Quotes line Item records are not going to the mail merge document.

I have tried these syntax in my Word Template of Quote Line Items :-
«Quote_LineItem_Start»«PRODUCT_NAME»«Quote_LineItem_Qty_Ordered»
«Quote_LineItem_Sales_Discount»«Quote_LineItem_Ext_Net_Price»«Quote_LineItem_End»

But none of them worked. Please anyone who have successfully done that can help me. Any suggestions are welcome.

Thanks.
How can I create a input lookup field on a VF page? I want to use the standard Salesforce lookup.

For example a field called 'Contact' whch looks up a contact.

Thanks
I'm creating an Apex class in which I need to read an Account Name slected by user. the issue is i am not able to find a way to read form field values. I know we can read the url parameters in Apex classes but i need to read the sleceted account name on the form in my apex code. can anyone help me achieve this? thanks.
Hi,
When I am updating the ParentId in "CaseComment" with the another ParentId.Then I got an error:-
""Please check the security settings of this field and verify that it is read/write for your profile.', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE', },""
And when I traced the error then I found a message "Check Modify date Premission for your profile in security setting".


   var cCase=new sforce.SObject("CaseComment");
       cCase.Id=SourceCaseCommentId;
       cCase.ParentId=TargetParentid;
     var result = sforce.connection.create([cCase]);


Please Help....
Hello all,
I'm a newbie on Salesforce and still learning. I'm coming across one problem for which i need your utmost help.
 
This is for the development of Employee Info application where the detail information of each employee is feeded into the application and can be managed accordingly... so,
How can i add(insert) a new record in my custom object where i have created a custom command button.
Below is the apex code for my controller:
 
here EmpInfo__c is custom object where all the information should be saved.
 

******************************

<apex:commandButton action="{!Save}" value="Save" /> // onclick of save button, a new record should be inserted

******************************

 

 

public class EmpCon {

String[] YOE = new String[]{};

String[] Desg = new String[]{};

EmpInfo__c emp;

String Id=System.currentPageReference().getParameters().get('IDInput');

String name=System.currentPageReference().getParameters().get('NameInput');

String add=System.currentPageReference().getParameters().get('AddInput');

String phone=System.currentPageReference().getParameters().get('PhoneInput');

String dob=System.currentPageReference().getParameters().get('DOBInput');

String doj=System.currentPageReference().getParameters().get('DOJInput');

String exp=System.currentPageReference().getParameters().get('ExpInput');

String desg1=System.currentPageReference().getParameters().get('DesgInput');

String skill=System.currentPageReference().getParameters().get('SkillInput');

 

public PageReference Save() {

PageReference curPage = System.currentPageReference();

EmpInfo__c emp;

emp = new EmpInfo__c(ID__c ='Id', Name__c='name', Address__c='add', Phone__c='phone', Years_Of_Experience__c='exp', Designation__c='desg1', Skills__c='skill');


try

{

insert emp; // here is the problem... how should insert a new record???


}catch (DmlException e) {

System.debug(e.getMessage());

}

return null;

}


 

**************

 Same problem occurs for Update

  • February 20, 2008
  • Like
  • 0