Test lightning with skuid opportunity and related objects

Hi,

we have installed SF lightning in test for review before moving into production anytime soon.

Our sales team do use an oppty skuid page in SF.com.

When we do create a new task today in production (SF.com classic) from skuid oppty ,the task is automatically related to the oppty.

Same for all custom objects associated to the oppty.

When we create new records from skuid oppty it opens a new window and custom object record is automatically assigned to the oppty.

Now in test with SF lightning this is no longer the case.

When we create a new task from skuid oppty or a new custom object record related to the oppty it is no longer automatically assigned to the oppty.

We have to find and select the oppty from the lookup field.

Is there anything specific to be added with lightning plateform to the skuid oppty ?

Thank you very much for your assistance.

Cyril

Hi Cyril

Can you provide some screen shots here please?

Not sure about your question. Are you using a Skuid page as a Lightning component or just previewing the page from the Page Builder?

It may be that your production org has some triggers or workflows influencing the data that you are seeing which don’t exist in your test org?


Thank you Gregg,
Here is xml example below.
When I go to “Tasks/Notes” TAB for instance and click create “New Task” button it opens standard lightning task creation page but the new task is not related to my oppty.
I have to search for my oppty within “Related to” task lookup field.
But when I do the same using salesforce.com classic it opens std task page and is automatically related to the oppty I am creating the task from.
Do you see a reason ?
Thanks
Cyril.

            <field id="ContentDocumentLinks" type="childRelationship" limit="10">
                <fields>
                    <field id="ContentDocumentId"/>
                    <field id="Id"/>
                    <field id="LinkedEntityId"/>
                </fields>
            </field>
            <field id="AttachedContentNotes" type="childRelationship" limit="10"/>
            <field id="AttachedContentDocuments" type="childRelationship" limit="10">
                <fields>
                    <field id="Id"/>
                    <field id="ContentDocumentId"/>
                    <field id="LinkedEntityId"/>
                </fields>
            </field>
            <field id="Validation_Rule_Check_Date__c"/>
            <field id="Appointment_Notes__c"/>
        </fields>
        <conditions>
            <condition type="param" value="id" enclosevalueinquotes="true" field="Id" operator="=" novaluebehavior="" state=""/>
        </conditions>
        <actions/>
    </model>
    <model id="TaskCompleted" limit="20" query="true" createrowifnonefound="false" sobject="Task" orderby="CreatedDate DESC" datasource="salesforce">
        <fields>
            <field id="Subject"/>
            <field id="Status"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="ActivityDate"/>
            <field id="Activity_URL__c"/>
            <field id="Type"/>
            <field id="Description"/>
            <field id="Account_Profile__c"/>
            <field id="Tier_1__c"/>
            <field id="Territory__c"/>
            <field id="CreatedDate"/>
        </fields>
        <conditions>
            <condition type="param" value="id" enclosevalueinquotes="true" field="WhatId" operator="=" novaluebehavior="" state=""/>
            <condition type="fieldvalue" value="Completed" enclosevalueinquotes="true" field="Status" operator="="/>
        </conditions>
        <actions/>
    </model>
    <model id="RevenueTransfert" limit="20" query="false" createrowifnonefound="false" sobject="RevenueTransfers_NewCustomeExceptions__c" doclone="" datasource="salesforce">
        <fields>
            <field id="Territory_A__c"/>
            <field id="Territory_B__c"/>
            <field id="Territory_A_Percent__c"/>
            <field id="Territory_B_Percent__c"/>
            <field id="Sales_Order__c"/>
            <field id="Core_Credit_Product__c"/>
            <field id="PO_Number__c"/>
            <field id="Disti_Invoice_Number__c"/>
            <field id="Requestor_Notes__c"/>
            <field id="Name"/>
        </fields>
        <conditions>
            <condition type="param" value="id" enclosevalueinquotes="true" field="Opportunity__r.Id" operator="=" novaluebehavior=""/>
        </conditions>
        <actions/>
    </model>
    <model id="TaskOpen" limit="20" query="true" createrowifnonefound="false" sobject="Task" doclone="" orderby="CreatedDate DESC" datasource="salesforce">
        <fields>
            <field id="Id"/>
            <field id="Activity_URL__c"/>
            <field id="Status"/>
            <field id="Subject" overridemetadata="true" ogdisplaytype="COMBOBOX" displaytype="TEXT" picklistsource="manual" returntype="TEXT" length="150"/>
            <field id="What.Name"/>
            <field id="Territory__c"/>
            <field id="Type"/>
            <field id="Account_Profile__c"/>
            <field id="Tier_1__c"/>
            <field id="Owner.Name"/>
            <field id="Priority"/>
            <field id="ActivityDate"/>
            <field id="Description"/>
            <field id="IsReminderSet"/>
            <field id="ReminderDateTime"/>
            <field id="OwnerId"/>
            <field id="What.Id"/>
            <field id="WhatId"/>
            <field id="CreatedDate"/>
        </fields>
        <conditions>
            <condition type="modelmerge" model="Opportunity" value="" enclosevalueinquotes="true" field="WhatId" operator="=" mergefield="Id" novaluebehavior="deactivate"/>
            <condition type="multiple" value="" enclosevalueinquotes="true" field="Status" operator="in">
                <values>
                    <value>Not Started</value>
                    <value>In Progress</value>
                </values>
            </condition>
        </conditions>
        <actions>
            <action>
                <actions>
                    <action type="requeryModel" behavior="standard" model="TaskOpen">
                        <models>
                            <model>TaskOpen</model>
                        </models>
                    </action>
                    <action type="requeryModel" behavior="standard" model="TaskCompleted"/>
                </actions>
                <events>
                    <event>models.saved</event>
                </events>
            </action>
        </actions>
    </model>
    <model id="NewEvent" limit="20" query="false" createrowifnonefound="false" sobject="Event" datasource="salesforce">
        <fields>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="Territory__c"/>
            <field id="Subject"/>
            <field id="Type"/>
            <field id="WhoId"/>
            <field id="Who.Name"/>
            <field id="WhatId"/>
            <field id="What.Name"/>
            <field id="Description"/>
            <field id="StartDateTime"/>
            <field id="EndDateTime"/>
            <field id="What.Id"/>
            <field id="Who.Id"/>
        </fields>
        <conditions>
            <condition type="modelmerge" model="Opportunity" value="" enclosevalueinquotes="true" field="WhatId" operator="=" mergefield="Id" novaluebehavior="deactivate"/>
        </conditions>
        <actions/>
    </model>
</models>
<components>
    <pagetitle uniqueid="sk-1bnMCy-318" model="Opportunity">
        <subtitle>{{AccountId}}</subtitle>
        <actions>
            <action type="savecancel" window="self" afterSave="" afterCancel="" uniqueid="sk-3Bdz-213">
                <models>
                    <model>TaskOpen</model>
                </models>
            </action>
        </actions>
        <renderconditions logictype="and"/>
        <maintitle>{{Name}}</maintitle>
    </pagetitle>
    <tabset uniqueid="sk-1bnMCz-319" defertabrendering="true" rememberlastusertab="false">
        <tabs>
            <tab icon="sk-icon-opportunities" name="Oppty Information">
                <components>
                    <tabset uniqueid="sk-1bnMCz-320" label="" renderas="radio" defertabrendering="true" rememberlastusertab="false">
                        <tabs>
                            <tab name="General">
                                <components>
                                    <basicfieldeditor layout="" uniqueid="sk-1bnMCz-321" model="Opportunity" showerrorsinline="true" mode="edit" showheader="true" showsavecancel="false">
                                        <columns layoutmode="fixed">
                                            <column width="33.3%">
                                                <sections>
                                                    <section title="General Information" collapsible="open" cssclass="">
                                                        <fields>
                                                            <field type="" required="true" id="AccountId" valuehalign="" optionsource="" displaytemplate="{{Name}}" searchtemplate="{{Name}}" pagesize="5" uniqueid="sk-3Bdz-239">
                                                                <label>Account Name</label>
                                                                <searchfields>
                                                                    <searchfield field="Name" operator="contains" query="true" show="true" return="true"/>
                                                                    <searchfield field="BillingCity" operator="contains" query="true" show="true" return="true"/>
                                                                    <searchfield field="BillingCountry" operator="contains" query="true" show="true" return="true"/>
                                                                    <searchfield field="BillingState" operator="contains" query="true" show="true" return="true"/>

Hi Cyril

You seem to have left out some of the XML here.  Can you paste it in again please? Thanks

Not Started In Progress TaskOpen models.saved {{AccountId}} TaskOpen {{Name}} Account Name

Thanks Greeg. Second try…
Cyril

Hi Cyril

Still not correct I’m afraid.

When you copy the XML make sure that you have a at the end of the XML. This is the close statement for the which you will see at the beginning of the XML.

Good luck (",)

Not Started

In Progress

TaskOpen

models.saved

{{AccountId}}

TaskOpen

{{Name}}

&nbs

Ok now I see at the end. Not sure what happened here. Sorry for this.
Thank you.
Cyril.

Actually no. When I copy paste I could see the complete page with at the end but now five minutes later when I come back again I see the page is incomplete.
Is there a limit?
Can I send you via email maybe ?

Hi Cyril

Thanks for the XML.  I created a page with it and i can see what you are trying to achieve.
I think it would be better to create a popup for the create a new task or event.  This way you can create a  model action that when the record is created it uses the {{$Param.id}} to update the related opportunity id to the task or event.  This way you will present the user with a consistent Ui as opposed to switching between Salesforce and Skuid Ui.  Also I noticed that you have more than 1 save button on your page.  The best practice is to use 1 save button on the page and set it to listen for all the models that will be updtaed in your page.

Hope this helps.

Hi Gregg,
Thank you for looking into this.
Does it mean we can no longer use URL global action link with SF lightning to open SF pages rather than skuid pages in some cases ?
I gave you the example of tasks in my xml but the same issue is visible on all custom objects where we preferred using SF pages instead of skuid  pages using a URL link to open SF pages.
It works very well this way with SF classic but seems no longer working for us in lightning.
When I click on URL link to open SF custom object page from our skuid oppty page it no longer  automatically link the SF custom object page to the oppty.
We have to manually search for the oppty now.
I did try to modify lightning URL link to related object without success. 
We can use popup for all of them probably if no other choice but keeping the way we do for years to click on a URL link to open SF custom page (in lightning now) when we think it is more appropriate would be the preferred option.
Waiting for your guidance maybe on how to keep using URL links in SF lightning and relate SF Custom object pages with skuid page automatically using global actions URL functionality.
Thank you again,
Cyril

Hi Cyril, I’m going to share my response, that I already sent to you, here too:

It seems like the new style of creating new records in Lightning compared to Classic prevents your solution from working. While you can address the input fields in Classic directly, because they are available as URL parameters, these parameters are no longer shown in Lightning URLs. To see that difference, let’s leave the Skuid page, go the Sales App in Salesforce and take a look at the Accounts page to compare Classic and Lightning.

Classic
Go to the Accounts page.
You can click on any account to see its details. Scroll down to related records of other objects, e.g. Contacts. Click the button “New Contact” and see how the URL changes. You are now no longer on “Accounts” but on “Contacts”. And the URL contains parameters in which you can find the account ID. Similar to the URL format you use in your Skuid page on the global action.

Lightning
Go to the Accounts page. You can click on any account to see its details. You can see the “Related” records of the other objects here, e.g. Contacts. Click the button “New” to create a new contact for this account. Now the pop-up opens and all inputs are made in the pop-up, however you can see that the URL didn’t change. There are no additional URL parameters visible.

What that means for your Skuid page:
On your Skuid page, you’ve been using the global action to “redirect to URL”. With merged syntax you were able to transfer the current opportunity ID from the Skuid page to the Classic Salesforce page. However, based on the comparison above, the URL format is different in Lightning, so I’m afraid that you can’t simply use the old way.

I also tried to modify the Lightning URL to transfer the opportunity ID, but unfortunately without success. Please see this Salesforce discussion about “URL Hacks in Lightning not possible”:
https://success.salesforce.com/answers?id=9063A0000019OLKQA2

So I’d like to come back to Gregg’s suggestion, to not leave the Skuid page but build the process (to create new records) in Skuid, so that you have full control of it.

In case you encounter any issues, we are happy to assist! Either here in the forum or if you create a new support ticket.

Regards,
Luzie