how to move data from one to other record within the same object.
Hi,
Is there a way where we can move data from a Record X to Record Y where Both Record X and Record Y or of the same object called MyCustomObject.
This MyCustomObject is a detail object to a Master object called Entitlement.
So what i wanted to accomplish is,
I have an expired entitlement record called (My Entitlement1) and it is linked to an account called My Accounts. My Entitlement1 has a child record Called Record X(this Record X is from the object MyCustomObject) which is used to save information related to the Entitlement like no of licences, servers, no of operating systems etc.
Now, I have a another entitlement called My Entitlement2 and this Entitlement also belongs to the same account(My Accounts).
Now, Record Y is child record to My Entitlement2 and the purpose of creating Record Y is same as like why Record X is created, that means the information saved Record X will be same as the Information that we are going to enter on Record Y because both the entitlements belongs to the same account.
So Instead of manually entering all the details in to the child record, is there a way where we can use Action framework to move the existing detail object record (Record X) to a new detail record (Record Y) under the Newly created Entitlement (My Entitlement2).
Can anyone please tell me the steps the i have to follow to achieve my requirement.
Thank you.
-Avinash
Is there a way where we can move data from a Record X to Record Y where Both Record X and Record Y or of the same object called MyCustomObject.
This MyCustomObject is a detail object to a Master object called Entitlement.
So what i wanted to accomplish is,
I have an expired entitlement record called (My Entitlement1) and it is linked to an account called My Accounts. My Entitlement1 has a child record Called Record X(this Record X is from the object MyCustomObject) which is used to save information related to the Entitlement like no of licences, servers, no of operating systems etc.
Now, I have a another entitlement called My Entitlement2 and this Entitlement also belongs to the same account(My Accounts).
Now, Record Y is child record to My Entitlement2 and the purpose of creating Record Y is same as like why Record X is created, that means the information saved Record X will be same as the Information that we are going to enter on Record Y because both the entitlements belongs to the same account.
So Instead of manually entering all the details in to the child record, is there a way where we can use Action framework to move the existing detail object record (Record X) to a new detail record (Record Y) under the Newly created Entitlement (My Entitlement2).
Can anyone please tell me the steps the i have to follow to achieve my requirement.
Thank you.
-Avinash
Tagged:
1
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
You can also do this with action framework even if Record Y exists already, but it would be a "Update a field on row(s)" action for each field.
Moving Record x will have to create Record Y. which means when i click the move buutton a new row or record(Record Y) has to created.
OR
It would be perfect if Record X is moved under from My Entitlement1 to My Entitlement2 when i click the move button. Where both the entitlements (My Entitlement1 and My Entitlement2) belong to the same account.
This way we will not have any child record under My Entitlement1 after the move has happened.
Just a quick question.
The models shown in the above screen shot Entitlement1Accounts and Entitlement2Accounts are the different model names of the Child object (child object to Entitlements). Is my understanding correct?
Please look at the following screen shot. this is just to make your self clear about the issue.
If required, I can send you xml also. somehow i have solve this issue.
Thanks.
-Avinash
<skuidpage unsavedchangeswarning="yes" showsidebar="false" showheader="false" tabtooverride="" personalizationmode="server" theme="GEC Design"> <models>
<model id="Entitlement" limit="50" query="true" createrowifnonefound="true" sobject="Entitlement" doclone="" type="" orderby="Name ASC" adapter="">
<fields>
<field id="AccountId"/>
<field id="Account.Name"/>
<field id="EndDate"/>
<field id="StartDate"/>
<field id="Status"/>
<field id="Name"/>
<field id="On_Hold__c"/>
<field id="Systems__c"/>
<field id="Contract_SLA__c"/>
<field id="Id"/>
<field id="Account.Id"/>
</fields>
<conditions>
<condition type="fieldvalue" value="Active" enclosevalueinquotes="true" field="Status" state="filterableon" inactive="false" name="Status"/>
<condition type="multiple" value="" field="Status" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="Status_All">
<values>
<value>Active</value>
<value>Expired</value>
<value>Inactive</value>
</values>
</condition>
</conditions>
<actions/>
</model>
<model id="Applications" limit="20" query="false" createrowifnonefound="false" sobject="Application__c" doclone="" type="" adapter="salesforce">
<fields>
<field id="Customer_Entitlement__c"/>
<field id="Customer_Entitlement__r.Name"/>
<field id="Id"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Customer_Entitlement__c" state="filterableoff" inactive="true" name="Customer_Entitlement__c"/>
</conditions>
<actions/>
</model>
<model id="expEnt" limit="20" query="false" createrowifnonefound="false" doclone="" type="aggregate" sobject="Application__c" adapter="salesforce">
<fields/>
<conditions>
<condition type="fieldvalue" value="Expired" enclosevalueinquotes="true" field="Customer_Entitlement__r.Status"/>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Customer_Entitlement__r.AccountId" state="filterableoff" inactive="true" name="accId"/>
</conditions>
<actions/>
<groupby method="simple">
<field id="Customer_Entitlement__r.Name" name="customerEntitlementrName"/>
<field id="Customer_Entitlement__r.Account.Name" name="customerEntitlementrAccou"/>
<field id="Customer_Entitlement__r.EndDate" name="customerEntitlementrEndDa"/>
<field id="Customer_Entitlement__r.On_Hold__c" name="customerEntitlementrOnHol"/>
<field id="Customer_Entitlement__r.StartDate" name="customerEntitlementrStart"/>
<field id="Customer_Entitlement__r.Status" name="customerEntitlementrStatu"/>
<field id="Customer_Entitlement__r.Contract_SLA__c" name="customerEntitlementrContr"/>
<field id="Customer_Entitlement__r.Id" name="customerEntitlementrId"/>
<field id="Customer_Entitlement__c" name="customerEntitlementc"/>
</groupby>
</model>
<model id="cuRent" limit="1" query="false" createrowifnonefound="false" sobject="Entitlement" doclone="" type="" adapter="salesforce">
<fields>
<field id="Id"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
</conditions>
<actions/>
</model>
<model id="upAp" limit="" query="false" createrowifnonefound="false" sobject="Application__c" doclone="" type="" adapter="salesforce">
<fields>
<field id="Customer_Entitlement__c"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Customer_Entitlement__c" state="filterableoff" inactive="true" name="Customer_Entitlement__c"/>
</conditions>
<actions/>
</model>
<model id="CurrentUser" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" type="" sobject="User">
<fields>
<field id="Id"/>
<field id="SmallPhotoUrl"/>
</fields>
<conditions>
<condition type="userinfo" value="" field="Id" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
</conditions>
<actions/>
</model>
</models>
<components>
<grid uniqueid="sk-pzCNM-318">
<divisions>
<division behavior="flex" minwidth="100px" ratio="1">
<components>
<skootable showconditions="true" showsavecancel="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="25" createrecords="true" model="Entitlement" buttonposition="" mode="read" uniqueid="sk-6rwo7-72">
<fields>
<field id="Status" valuehalign="" type="CUSTOM" snippet="icon" columnwidth="30px"/>
<field id="On_Hold__c" type="" valuehalign="" columnwidth="40px"/>
<field id="Name" valuehalign="" type="" columnwidth="300px" allowordering="true"/>
<field id="AccountId" valuehalign="" type="" columnwidth="450px" allowordering="true">
<label>Account Name</label>
</field>
<field id="StartDate" valuehalign="" type="" columnwidth="100px" allowordering="true"/>
<field id="EndDate" valuehalign="" type="" columnwidth="100px" allowordering="true"/>
<field id="Contract_SLA__c" valuehalign="" type="" columnwidth="100px"/>
<field id="Systems__c" valuehalign="" type="" columnwidth="150px"/>
</fields>
<rowactions>
<action type="edit"/>
<action type="delete"/>
<action type="multi" label="Move Site Doc from old Entitlement" icon="ui-silk-application-go">
<actions>
<action type="emptyModelData">
<models>
<model>expEnt</model>
</models>
</action>
<action type="setCondition" model="expEnt" condition="accId" value="{{Account.Id}}"/>
<action type="setCondition" model="cuRent" condition="Id" value="{{Id}}"/>
<action type="requeryModels" model="expEnt" behavior="standard">
<models>
<model>expEnt</model>
<model>cuRent</model>
</models>
</action>
<action type="drawer">
<drawer title="Drawer Area" width="90%" closehandle="true">
<components>
<skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="expEnt" buttonposition="" mode="readonly" uniqueid="sk-1c5F1t-309">
<fields>
<field id="Customer_Entitlement__r.Name" name="customerEntitlementrName" valuehalign="" type="" snippet="removeLater"/>
<field id="Customer_Entitlement__r.Account.Name" name="customerEntitlementrAccou" valuehalign="" type=""/>
<field id="Customer_Entitlement__r.EndDate" name="customerEntitlementrEndDa" valuehalign="" type=""/>
<field id="Customer_Entitlement__r.Contract_SLA__c" name="customerEntitlementrContr" valuehalign="" type=""/>
<field id="Customer_Entitlement__r.On_Hold__c" name="customerEntitlementrOnHol" valuehalign="" type=""/>
<field id="Customer_Entitlement__r.StartDate" name="customerEntitlementrStart" valuehalign="" type=""/>
<field id="Customer_Entitlement__r.Status" name="customerEntitlementrStatu" valuehalign="" type=""/>
</fields>
<rowactions>
<action type="multi" label="Add Site Doc" icon="ui-silk-add">
<actions>
<action type="adoptRows" sourcemodel="Applications" targetmodel="Applications"/>
<action type="updateRow" fieldmodel="upAp" value="{{$Model.cuRent.data.0.Id}}" field="Customer_Entitlement__c" enclosevalueinquotes="true"/>
</actions>
<renderconditions logictype="and"/>
</action>
</rowactions>
<massactions usefirstitemasdefault="true"/>
<views/>
<searchfields/>
</skootable>
</components>
<beforeload/>
</drawer>
<popup title="New Popup" width="90%">
<components/>
</popup>
</action>
</actions>
<renderconditions logictype="and">
<rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="Entitlement" sourcetype="userinfo" sourceuserinfotype="name" value="Avinash Babu"/>
</renderconditions>
</action>
<action type="multi" label="Open Site Doc" icon="ui-silk-sitemap-color">
<actions>
<action type="redirect" window="blank" url="apex/skuid__ui?page=Site_Doc_v2&id={{Id}}"/>
</actions>
</action>
</rowactions>
<massactions usefirstitemasdefault="true">
<action type="massupdate"/>
<action type="massdelete"/>
</massactions>
<views>
<view type="standard"/>
</views>
I just joined the meeting.
Thanks
I solved the issue with no extra JavaScript being used.
Thanks you for you time.