You need to sign in to do that
Don't have an account?
Harel Cohen
Can't find mt Task
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:
Any ideas where did this task went to or what am I doing wrong?
Thanks in advance,
Harel
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:
- Declared the object (from the Apex part):
<apex:remoteObjects jsNamespace="CallLog"> <apex:remoteObjectModel name="Task" fields="AccountId, CallObject, Description, ActivityDate"/> </apex:remoteObjects>
- Instantiate it:
var oTaskCL = new CallLog.Task();
- Populated some values including the binding to Account ID:
oTaskCL.Set('AccountId', accId); oTaskCL.Set('Description', 'Sales Call'); oTaskCL.Set('ActivityDate', '01/03/2017');
- 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.
Any ideas where did this task went to or what am I doing wrong?
Thanks in advance,
Harel
May I suggest you to check the debug log and you will get the details of the execution also details of any errors/exceptions if any.
Also, make sure that you have added Task as related list of Account layout.
Let me know if this helps :)
Thanks!
Amit Singh
Thank you for taking the time to answer.
Amit: "Debug log" as in the client's browser? There is nothing there... If you meant for something else please advise...
Amit & Alex: How do I "make sure that you have added Task as related list of Account layout"? In the UI I see 'Open Activities' and 'Activity History'. Does this mean that it is related list?
This is my complete Visualforce test code. Please see if you can figure out why I can't get the task into account 0016E00000AWcXOQA1
The screenPop() is there to open the acount immediately to check if the task record is in there.