Create Task - valid SalesRepCode required

I’m trying to create a task both in Task List as well as programmatically using a function. I am getting an error that a valid SalesRepCode is required. I have added myself to these Work Force accounts as an authorized user. I’ve tried several different work forces accounts. I keep getting this error. Anyone have any ideas?

I’ve tried examining the Payload and there’s definitely a valid Sales Rep in the SalesRepCode as well as in the Key1 field since this is a “SalesRep” related to task.

Is there an entry is QSalesRep? If not there needs to be.

1 Like

Even if the task is not related to a quote?

What is the RelatedToFile for the task?

1 Like

I for some reason was thinking quote tasks. What are you relating the task to?

1 Like

It says SalesRep. I am creating the task from within Task List. And it’s meant to be used as a reminder to follow up on accounts receivable collections. So I won’t have a quote to tie it to. I thought I could use tasks for other things besides quotes…

I could be wrong, but I think they’re only for quotes and projects. That’s the only way I’ve ever used them.

1 Like

Could be. In the past, I’ve used them for custom tasks and I was able to create them but I did it using a UBAQ. And if I hit “New” it just worked (provided I gave it the key fields). But, alas, everything is different in Kinetic lol

It looks like you can create a task with the RelatedToFile being SalesRep and then put the SalesRepCode in Key1, but when you hit the add new button on the TaskList screen it just uses whatever row you’re already on and tries to copy the relatedtofile and key1 for that row.

2 Likes

I’m curious now… testing this. It’s been a while since I was in tasks. We used to use them heavily but stopped. We switched to using Salesforce for tasks so they were in the CRM.

2 Likes

I think the RelatedToFile is person when it’s a sales rep? That’s how ours are in 24.2.

We do have tasks related to a Customer. RelatedToFile is Customer and Key1 is the CustNum. We don’t have very many and I’m not sure where we created them from.

1 Like

Customer may actually make more sense for what we’re trying to accomplish. Maybe then it won’t yell at me.

Tasks might be more flexible than I though. In the Rest Help page I submitted a GetNewTask with RelatedToFile: UDCodes and one of my codetypeIDs as Key 1 and it returned 200. Might just not be able to rely on that new button on the task list grid.

2 Likes

Do you use territories? If so, are you an authorized user of the work force ID who is specified as the primary salesperson for the territory to which the customer is assigned?

1 Like

Great point. I’ll follow up on that.

So you helped me figure out why the Task List would fail when creating a new task manually. I should probably report that as a bug. I don’t imagine many people are using tasks like this but if they are, this is a major inconvenience.

As far as why I couldn’t create a task with the SalesRep as the related to, I never did quite figure out. I used a sales rep that I was authorized to use and able to change their existing tasks. In any event, I was able to use RelatedToFile = Customer and then use the customer ID in Key1. That seems to be the trick. That also has the added benefit of showing up on the Customer Tracker.

Thanks all!