Some questions about SuiteCRM operation

Hi there,

I have a couple of questions if anyone may help.

  1. VAT. Ok I know there’s the Studio but anyone knows a reasonable tutorial to create the VAT fields properly? VAT kinda is used everywhere in the world, I believe it would be a major improvement to just have this by default. Or even a settings option to enable or disable VAT according to user preference? Like the base price is always the base price, VAT is added. Is there any feature request in this direction, are the feature requests public?

  2. Ok so I have SuiteCRM 8.4 and a User type group for Sales. In the Sales Group I have one user.
    I created a WebToForm campaign (used the System Administration user, but campaign owner is the Sales Group) to embed on a test website, and the Target List “website” is owned by the Sales Group user.

Now when a contact request is submitted via form it gets created by the system administrator and assigned to the system administrator. Why, and how to have it created by the Sales Group user, and … well, preferably to have these leads round-robin distributed along the sales agents?

Cheers and thank you

For #2, you can have a Workflow for new records, which changes fields and assigns the record.

you might want to add some condition to ensure your Workflow only runs for stuff coming from the website.

@pgr thank you for your reply.

But why being the campaign owned by another user it gets assigned to the system administrator? Shouldn’t at least get assigned to the user assigned to the campaign?

Records are assigned (by default) to the user creating them on the UI.

In web-to-person forms, there is no user, so they run as the system user.

If you have a better logic (and you do), you need to spell it out to SuiteCRM in a logic hook or Workflow…

Actually I was just looking at the WebToForm and noticed one input named assigned_user_id:

<input name="campaign_id" id="campaign_id" type="hidden" value="..." />
<input name="redirect_url" id="redirect_url" type="hidden" value="..." />
<input name="assigned_user_id" id="assigned_user_id" type="hidden" value="..." />
<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />

So I’m figuring changing the value here might at least sort the problem of them being assigned to the System Administrator user. It’s almost 19h here not sure if will be testing today but will let know.

1 Like

Hi there,

Ok so had a rough morning just testing this now. I haven’t looked further but filling the form after changing the value of assigned_user_id I’m unable to submit the form.

php error log returns:

[10-Oct-2023 12:22:48 Europe/Lisbon] PHP Notice:  Undefined index: LBL_SERVER_IS_CURRENTLY_UNAVAILABLE in /var/www/develop/public_html/sales/public/legacy/modules/Campaigns/WebToPersonCapture.php on line 360
[10-Oct-2023 12:22:48 Europe/Lisbon] PHP Notice:  Undefined index: LBL_SERVER_IS_CURRENTLY_UNAVAILABLE in /var/www/develop/public_html/sales/public/legacy/modules/Campaigns/WebToPersonCapture.php on line 377

I have no idea of what to say from this error actually.

Are you using an actual user id, not a user name?

Also, don’t omit the campaign_id, it has to be there.

1 Like

Using a Workflow is often a better way than playing with Code!

  • easy to enable /disable with one click.
  • don’t need to understand the complexities of the system ‘under bonnet’ -can focus just on the business logic and task
  • update safe to the nth degree
  • keeps a log of every time it has run - right there in the WorkfLow page.

Of course - for those who are both (a) a PHP guru and (b) willing to take the time to learn the specific ‘domain knowledge’ of SuiteCRM: then there are MANY things that can be done that a Workflow will not do.

But for everything that a workflow can do: why not use it.
In fact most users are surprised how powerful work-flows can be! So the sooner every power-user like you gets to know them, the sooner you’ll see the power they bring.

To take Workflows to an even higher power - @pgr above has some Power versions of it: that he’s seeking a few additional sponsors so he can polish them and then release them open source to the community.

Push $20 his way and experiment with Workflows in general: would be good advice for many power-users coming new to SuiteCRM. Leave PHP fiddling until later. Workflow practise will also teach you about the underlying Suite fields and relationships etc: but in a gentle way!



So I have created two forms, one the first I created before other users exist etc. and saved the code. you can even download the html file the system provides
from there I usually separate html from css to make it easier to embed, works like a charm with wordpress and elementor for example this I tested.

recently I made another one assigned it during creation to sales-group and the code provided for this new form had an assigned user id not name. Not even originally was a name, the previous value was “1” which is consistent with the system administrator user id.

About omitting, its so they don’t show on the front_end as they are already populated with those given values. Its from the original code, didn’t change anything.

& @DJuser

Howdy mate thanks for your reply, amazing. Ok so I definitely have to take a look into those Workflows. I’m nothing of a PHP Guru, actually my worst field is programming. One has to know its weaknesses.

The information about @pgr 's work is quite interesting and definitely I’ll send 20 his way just give me till November October brought an inspected surprise and its a bit tighter! But would like to see more about that.

Are there some reference tutorials for workflows aside suite docs? thanks

You can assign the user using the user id. Here’ as a tutorial I did using contact form 7 in wordpress instead of the campaign form. However, it actually uses the campaign entry point and works exactly the same (this works in Gravity Forms too if you happen to be using wordpress). The advantage of using Contact Form 7 or Gravity Forms is that you can implement ReCaptcha. The SuiteCRM form has no spam protection.

I have a post in my blog that is about workflows, generic stuff

I wrote more text about Workflows but I put it in the official Docs, so you probably already have that covered.

Hi guys sorry for the late reply I’ve been overwhelmed these past few days.

@pstevens amazing guide I know I read it before and it gave me some insight. Now I remember trying to implement it but without success, but went instead with the native HTML (merely cause it is simpler to get to work - in wordpress yes - with Elementor). Might revisit this tho.

@pgr will look at it carefully when I get a break! Cheers guys thanks

It works both with CF7 and Gravity Forms, probably others. I use it quite often so if you’re having troubles implementing, let me know what the issue are. The key advantages over the SuiteCRM campaign form is that you can implement recaptcha easily to prevent spam and also have more robust forms with form logic etc. that you get with these plugins and it pushes the contact into SuiteCRM just the same.

Hi @maverickws

How did you get on with @pgr 's cool Power Workflow - and Workflows in general?
If you’ve not had time to try it on your main webform: maybe start on a simpler task to build your Workflow skills? I’d give you 20 minutes of my time to build your first one, if you wish. I love Workflows so much, they are rather a well kept secret in Suite - so I’m happy to help get the word out.

Hi @DJuser actually I haven’t, been swamped and with little time to dedicate to dwelling on that.
Will let know when I do

1 Like