I have a mass action popup in a table that creates a new record. On this new record is a reference to an account(Firm__c). I need to get the account’s billingpostalcode and copy that value to a field on the new record. I’m using actions on the model but it does not pull the value for billingpostalcode. As a sanity check I used the billingstate field and that works great.
It’s like Skuid is not pulling in billingpostalcode. I do have billingpostalcode selected under the fields.
Can you double-check field level security on that field for your profile. There are times (especially for System Administrators) when standard salesforce pages let them do things that if you checked the actual metadata info would not allow them to do.
Sorry for all the dumb questions, but does the record in question actually have a value for BillingPostalCode? When Salesforce serializes sObjects, if a value is null, it leaves it out completely.
hey Ben…anything else you can think of to check here. I feel like there is something up with the BillingPostalCode field. I even tried creating a formula field for it and the value in the formula field is empty. It’s almost like Squid doesn’t see it in the metadata.
John actually showed me the page you’re working on. It looks like you added some search fields manually via XML to the SOSL lookups on RPS_Firm__c. For BillingPostalCode to return correctly, I believe it needs to be in the list of search fields as well.
If you added this…
I believe it should work correctly. Does that make sense? We have an outstanding issue to address allowing you to add “searchfields” in the Page Composer for SOSL lookups.
I looked at the XML for your page and I saw the change you made. I think you need to make that same change in one other place. Can you try adding that line of code into the other “searchfields” section and let me know how it goes?
Yeah, this is a bit tricky, but I’ll try to explain.
When Skuid loads, it gets everything it needs for all of your models. This is any metadata about the objects (picklist values, display types, etc), as well as the actual records contained in the model. In the case of your NewSalesTerritory model, it starts out with no data. Once the page is loaded, Skuid does not communicate with the server again until a model requests a reload or a save.
In your case, when the popup is opened and a Firm record is searched for, Skuid makes a request to salesforce to bring back data on all of the Firms that match your search criteria. The “searchfields” configuration tells Skuid which fields to query on the Firms that you’re searching for. Once you select a Firm, Skuid automatically transfers data from the search response into your NewSalesTerritory model. If you don’t tell Skuid to search for the “BillingPostalCode” field, it will not be able to transfer it over to your NewSalesTerritory model.