- Joined
- Jul 13, 2018
- Messages
- 779
- Reaction score
- 122
I am trying to insert a contact record into mysql using the following statement shown below.
When it runs I get Object reference not set to an instance of an object. I'm fairly sure it this , '[[CallStartTimeLocal].ToString("yyyy-MM-ddTHH:mm:ssZ")]', that is causing the problem.
The same SQL statement in Call Journaling does work and correctly formats the time.
INSERT INTO calls (phonebusiness, firstname, lastname, agentextension, description, calldatetime, callduration) VALUES ('[Number]', '[Number]', '[Number]', '[Agent]','3CX PhoneSystem Call', '[[CallStartTimeLocal].ToString("yyyy-MM-ddTHH:mm:ssZ")]', '[Duration]')
following guidelines at https://www.3cx.com/docs/server-side-crm-template-xml-description/#h.vcivldjsa1lz
Started CreateContactRecord
System.NullReferenceException: Object reference not set to an instance of an object.
at TcxLexicalParser.LexEvaluator.InstanceFunction(IValueManager valueManager, FunctionElement functionElement)
at TcxLexicalParser.LexEvaluator.Process(Element element, IValueManager valueManager, Boolean isFunctionArgument)
at TcxLexicalParser.LexEvaluator.ProcessInt(ConcatElement concatElement, IValueManager valueManager, Boolean isFunctionArgument)
at TcxLexicalParser.LexEvaluator.Process(Element element, IValueManager valueManager, Boolean isFunctionArgument)
at CrmIntegration.EscapedExpressionEvaluator.ParseExpression(String expression, Boolean asExpression, IValueManager customManager)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.CreateContactRecord(IValueManager customManager, String scenarioId, Func`2 filterResultsFunctor, CancellationToken token)
When it runs I get Object reference not set to an instance of an object. I'm fairly sure it this , '[[CallStartTimeLocal].ToString("yyyy-MM-ddTHH:mm:ssZ")]', that is causing the problem.
The same SQL statement in Call Journaling does work and correctly formats the time.
INSERT INTO calls (phonebusiness, firstname, lastname, agentextension, description, calldatetime, callduration) VALUES ('[Number]', '[Number]', '[Number]', '[Agent]','3CX PhoneSystem Call', '[[CallStartTimeLocal].ToString("yyyy-MM-ddTHH:mm:ssZ")]', '[Duration]')
following guidelines at https://www.3cx.com/docs/server-side-crm-template-xml-description/#h.vcivldjsa1lz
Started CreateContactRecord
System.NullReferenceException: Object reference not set to an instance of an object.
at TcxLexicalParser.LexEvaluator.InstanceFunction(IValueManager valueManager, FunctionElement functionElement)
at TcxLexicalParser.LexEvaluator.Process(Element element, IValueManager valueManager, Boolean isFunctionArgument)
at TcxLexicalParser.LexEvaluator.ProcessInt(ConcatElement concatElement, IValueManager valueManager, Boolean isFunctionArgument)
at TcxLexicalParser.LexEvaluator.Process(Element element, IValueManager valueManager, Boolean isFunctionArgument)
at CrmIntegration.EscapedExpressionEvaluator.ParseExpression(String expression, Boolean asExpression, IValueManager customManager)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.CreateContactRecord(IValueManager customManager, String scenarioId, Func`2 filterResultsFunctor, CancellationToken token)