• Harel Cohen
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello,
I'm trying to insert a call log (Task) to an account from Visualforce using Javascript. The thing is that when I go to that acount the Task is not there.
This is what I have done so far:
  1. Declared the object (from the Apex part):
    <apex:remoteObjects jsNamespace="CallLog"> 
        <apex:remoteObjectModel name="Task" fields="AccountId, CallObject, Description, ActivityDate"/>
    </apex:remoteObjects>
    
  2. Instantiate it:
    var oTaskCL = new CallLog.Task();
  3. Populated some values including the binding to Account ID:
    oTaskCL.Set('AccountId', accId);
    oTaskCL.Set('Description', 'Sales Call');
    oTaskCL.Set('ActivityDate', '01/03/2017');
  4. I've verified that accId is the correct account ID at this stage by doing screen-pop to the account using accId just before this action.
However when I go to the UI of the account I don't see this (or any other) records.
Any ideas where did this task went to or what am I doing wrong?
Thanks in advance,
Harel

 
Hello,
Apologies for this basic question. This is my first interaction with Salesforce in general and Visualforce coding in particular...
I'm using Javascript on Visualforce page.
I need to insert few data items (all are strings) as Task on a given account. I've already obtained the account ID and my Calback function received the relevant strings to insert (i.e. no trigger or query is required).
How do I insert this information as Task for this user using Javascript code?
Note (just in case this info is relevant) that this is a click-to-dial implementation which shows the Phone button on all type of screens where phone number exists therefore it is not bound to any specific controller. 
Let me know if you require any further information from my side.
Thank you for any support
Harel
Hello,
I'm trying to insert a call log (Task) to an account from Visualforce using Javascript. The thing is that when I go to that acount the Task is not there.
This is what I have done so far:
  1. Declared the object (from the Apex part):
    <apex:remoteObjects jsNamespace="CallLog"> 
        <apex:remoteObjectModel name="Task" fields="AccountId, CallObject, Description, ActivityDate"/>
    </apex:remoteObjects>
    
  2. Instantiate it:
    var oTaskCL = new CallLog.Task();
  3. Populated some values including the binding to Account ID:
    oTaskCL.Set('AccountId', accId);
    oTaskCL.Set('Description', 'Sales Call');
    oTaskCL.Set('ActivityDate', '01/03/2017');
  4. I've verified that accId is the correct account ID at this stage by doing screen-pop to the account using accId just before this action.
However when I go to the UI of the account I don't see this (or any other) records.
Any ideas where did this task went to or what am I doing wrong?
Thanks in advance,
Harel

 
Hello,
Apologies for this basic question. This is my first interaction with Salesforce in general and Visualforce coding in particular...
I'm using Javascript on Visualforce page.
I need to insert few data items (all are strings) as Task on a given account. I've already obtained the account ID and my Calback function received the relevant strings to insert (i.e. no trigger or query is required).
How do I insert this information as Task for this user using Javascript code?
Note (just in case this info is relevant) that this is a click-to-dial implementation which shows the Phone button on all type of screens where phone number exists therefore it is not bound to any specific controller. 
Let me know if you require any further information from my side.
Thank you for any support
Harel