on 04-24-2015 1:47 PM
Hi Experts,
I have created the custom business object and assign some fields into it.
I have also assign some custom action into this custom business object. After that i have created the Embed component and and configured into Account_TI screen and its display data.
Now when I open Any Account and go to that newly embed component in silverlight 2 options comes ( Save and Cancel ) to remove this options or to make display mode by default I have followed the below steps:
1) Open Embed Component into UI designer.
2) Go to Properties Window.
3) In the top from the dropdown list select embed component.
4) In the Property go to Configuration --> WorkProtectRelevant equal to false.
5) After save and activate and check but still getting ( Save and Cancel ) option in embed component
Is there any other solution or any other settings require to remove this ( Save and Cancel ) option.
Regards,
Mithun
Hi Mithun
I had this exact issue you had when trying to read my custom BO and no records were returned. (Note this issue doesn't occur if records existed).
As I mentioned before, the only thing that worked for me was adding a WindowAction - Save in the read event but this is not ideal.
I think we could both raise an incident to SAP as this is very unexpected behaviour.
Maybe we can get them to look at the way C4C handles the read event for future releases.
You could set all the fields to read only but I'm not sure if this will stop the edit mode opening.
We should not have to create a read only indicator and bind to all the fields simply because we have a read of a BO. We have not changed anything on the UI, so this doesn't make sense.
Do you agree?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mithun
We had this exact same problem where our embedded component would open in edit mode when it did not find any records in the custom BO.
If records existed in the custom BO, the EC would not open in edit mode..
Is this the same as your case?
Try add a condition to check for blank before your read operation. This will prevent the read and stop the edit mode occuring.
Let me know if this works
Cheers
Brad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brad and Sumeet,
Thanks for you reply on this post.
In my requirement we do not want to save record anymore.
Also my scenario : We have consuming the on-premise web service into c4c we have created the custom business object ( Not Screen) and based on this custom business object we have created the embed component and design the screen to embed with Account_TI.
We have Read the Account ID from Account _TI screen and assign to embed component element Alternative key AccountID.
We have created of configured the embed component Inport to Read and Assign the Account ID as below:
My Custom business object :
businessobject ECC_recordBO {
[AlternativeKey] [Label("Customer Number")] element AccountID : BusinessPartnerInternalID;
element CtLimit : LANGUAGEINDEPENDENT_LONG_Text;
element AvailCLimit : LANGUAGEINDEPENDENT_LONG_Text;
element AccCurrency : CurrencyCode;
action ViewAcc;
}
My embed component InPort event :
ReadEvent
In ReadBOEvent I have add below actions:
BO Operation
Condition
And under the condition I have use the below actions :
To create BOOperation
Second DataOperation as below :
Assign AccountID from Account_TI to AccountID of embed component.
Also once the user come into the Account_TI screen and go to embed component first its in display mode and when he click on any action under embed component its in edit mode but we do not want to save data anymore.
Regards,
Mithun
Hi Brad,
Currently the EC work and Inport as well as alternative key populated with AccountID of Account_TI screen.
When I entered into the Account_TI screen It is in display mode but when I go to EC Its change to Display mode to Edit mode.
I want when user click or select EC first its in Display mode and when user click on button exist on EC then the EC change to edit mode otherwise It I want to in display mode.
Regards,
Mithun
I know it isn't clean, but you could add a windowaction - save at the end of your ReadBOEvent. This does mean it will save any changes the user has already made in other account screens.
I mentioned this problem on another blog post and Gert Kix responded with this:
Recently it was brought to my attention that this type of behaviour can occur when an embedded component is added to a custom object and the WorkProtectedRelevant flag on the embedded component is not set. You have this flag on field level but also on embedded component level
I haven't tried this solution yet but I will try in a couple of days. Let me know if you do before then.
Cheers
Brad
Hi Fred,
My Scenario :
We have created custom business object (without screen) and based on that we have created embed component and design as I have mentioned in previous steps.
In My use case we have consume on-premise web services and read data based on Account Id. So once user open any account and go to my embed component then Account ID filled automatically using InPort and alternative key. So user do not need to enter AccountID and once user click on Button before that I want to screen in display mode but when user click on Button after I understand screen change to display to edit mode but before button press I want to make this embed component in display mode.
I know I have used the Create function to create instance of custom business object and may be this reason the screen in edit mode but In one of the video I have seen that using WorkProtectedRelevant make it false it make it display mode.
Please let me know if you need any more details about this scenario.
Regards,
Mithun
Hi, Mithun.
Sorry for the late reply.
I think making the WorkProtectedRelevant to false can not make your screen read-only.
I think WorkProtectedRelevant is just for confirming your changes to an instance.
Setting it to false will automatically omit the save confirmation dialog.
Here are some suggestion.
1. Add an indicator to your BO with default "true"..
2. Add an action (for button) to your BO.
3. Bind the read-only properties of the fields on your EC with the indicator
4. In the Action event, assign the indicator to "false".
Regards,
Fred.
Hi Fred,
I have tried your suggestion as below :
Add Indicator in Custom business object with default "true" and assign this field to Read Only property to every field using Advance option.
After when I open Account screen and go to my embed component getting same in edit mode.
Is there any other configuration or changes require?
Regards,
Mithun
Hi Fred,
I have not used anywhere false value in my custom solution.
In my custom business object I have make it default value as shown below.
element IndRead : Indicator = true;
And I have open my EC in UI designer and go to property of each fields and assign this Indicator field in Read-Only Advance option and bind it.
Kindly help me if I am wrong anywhere.
Regards,
Mithun
Hi, Mithun.
Sorry for my late reply.
You can do just the same as you did to your custom BO.
Add an Indicator extension field to the standard BO.
Open your AccountTI screen, in the extensiblity explorer, select the desired field and click Adjust Properties and use "bind" for Read-Only.
In the aftermodify event, write the logic.
Regards,
Fred.
I was finally able to make it work in HTML5.
In SL, if you set the WorkProtectedRelevant to false, it works.
In HTML5, if you do the same, and also uncheck this flag on BO 'Create' operation and BO Action, it doesn't work. You have to also set the WorkProtectedRelevant flag to false on every single data field bound to the object.
Hope this helps.
Thanks.
Fernando
Hi Mithun,
Do you have the alternative key field which gets the inport Account ID value as visible on the screen. If yes can you make it hidden and see what happens?
Thanks and Regards,
Sumeet Narang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumeet,
I have made change on Embed component InPort
Property :
RequestFireOnInitilization = False
RequestAutoRefire = True
When I tested the screen will be in Display mode but when I click on button in embed component no data display. and when I revert the changes the data comes fine.
Also InPort Account and Custom BO Alternative key not populate.
Help me anything wrong in it.
Regards,
Mithun
Hi, Mithun,
Are you sure if that confirmation dialog box is coming from your EC not from Account_TI?
Regards,
Fred.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.