I am in the process of converting a SF Classic page to Skuid. On the Classic page, there are two lookup fields that pull in the current user’s manager and that manager’s manager. This information is used as part of the approval process. This is working with no issue in Salesforce. When a new record is created, those lookup fields are populated with the appropriate managers’ IDs. However, when I created the Skuid page and include these two lookup fields, they are not being populated on the creation of a new record. Any idea what I may be doing incorrectly?
Maybe related to this. Read Rob’s comment at the end. https://community.skuid.com/t/user-userid-displays-salesforce-id-instead-of-name
Thanks for the pointer Raymond. In this case I am using a Global Action rather than a button to create the new record. I assume the concept translates. While in your situation you were getting the user record ID, I am getting nothing at all. I would actually be ok with the record ID since I’m going to use it to set the User who will be the first and second approvers in the approval process.
I made the changes to my Create New Record action I saw in Rob’s example (minus the name). However it’s still not showing a value in the reference field. I’m likely still doing something incorrectly. Here is the setup:
Here is the result:
You will notice that the two fields at the top are also reference fields and they are populating correctly. The difference is that they are not lookup fields.
Try changing the look up fields in the component to read only. Sounds strange but I think it may work.
No luck. Changed the fields to read only and I’m still seeing the same result.
I think CreatedById is read only at the salesforce level.
Agreed. The others should be read only as well because they are the record ID for the user profile.
Instead of populating those fields with a new row action, try creating conditions on the model set to filterable default off. That set the values of these fields. Then in your action sequence activate those conditions then create new row. That may work.
I would create a User model - limit to 1 record, and set a condition where the UserID = running userID. Select UserID and ManagerId (and Full name) in this model. This gets both pieces of info about the user creating the record.
Then either on your action button or your model condition (like Raymond suggested above), set the fields using a “Field from another model” action. make sure your User model is above your new record creation model in the order of models on the page.
I also wouldn’t set the CreatedBy. I don’t think SF lets you change that.
My apologies Raymond and Chandra. I’ve tried both approaches and I’m still not getting the data to populate, unless I’ve done something wrong (which is entirely possible). I’m still trying to find my sea legs when it comes to Skuid. I think I’m going to abandon this effort and create a process builder to populate these fields. Thanks for your time and your input.
One last thing you can try befor you abandon. Add a template field and put the merge syntax you are using to populate the field into it. Then preview the page. This will allow you to see what value your action sequence is trying to put into the fields.
Thanks for that tip Raymond. I’ll give it a shot. It might lead me in the right direction at least.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.