cancel
Showing results for 
Search instead for 
Did you mean: 

Field edit mode based on Saved/Not Saved

Kinsbrunner
Active Contributor
0 Kudos

Hi Guys,

I am having a doubt where I'd like to get expert advice.

My business scenario: I need to add a drop down (DDLB) with certain values on the Account (in QuickActivity floorpan). This field has to be mandatory. Once the Account has been saved, this field shouldn't be editable anymore.

I first started working with KUT, created the DDLB with its values, made field mandatory, yet, was missing to add the dynamic enable/disable logic so, I have now moved into PDI. So, I have created the Account business extension and the code list. Then, I enhanced the screen (AcountQA) and set the field as mandatory.

I am not very sure how to handle and make it read-only once saved. I was trying to do something similar as shown on traditional SAP example (Bonus Plan) by binding the field to another one. On the otherhand, when doing this in traditional CRM WebUI, I used to check the ID field as it was getting only populated after it was saved and then, never got empty again.

Any idea/approach/proposal?

Many thanks in advance.

Regards.

Alejandro.

Accepted Solutions (1)

Accepted Solutions (1)

Kinsbrunner
Active Contributor
0 Kudos

Hi everyone,

Issue was solved in a more simple way, and even more, without requiring PDI, just with KUT.

As the requirement is to only be able to change my field before being saved for the first time, I only need to create my custom field through KUT and add it as editable on the QuickCreate (QC) floorpan while adding it into QV (QuickView) and TI (ThingInspector) as read-only. In case of adding in on another floorpan, just add it through KUT and set it as read-only and, Issue Solved!!!!

Thanks and regards.

Alejandro.

Answers (1)

Answers (1)

former_member200567
Active Contributor
0 Kudos

Hi Alejandro.

       

          How about assigning true the indicator in the BeforeSave event of Account XBO?

1. You have to add another extension field (indicator). Let's say it is Ext_Indicator.

2. Add the indicator to the UI also. and make visible false.

3. Bind the read only property of your code list with Ext_Indicator in the Adjust Properties.

4. Write some codes in BeforeSaveEvent.

if(!this.YourCodeList.IsInitial()){

     this.Ext_Indicator=true;

}

Best Regards

Fred

Kinsbrunner
Active Contributor
0 Kudos

Fred,

Thanks for your answer. I am not very convinced on this approach.

I directlly need to see it disabled once saved and, next time I enter into the Account, directly read-only.

Is it feasible to bind it against the ID as, before being saved, ID is empty and, after saving, it should get populated. Is this something that I could achieve?

Let me know your comments.

Thanks and regards.

Alejandro.

former_member200567
Active Contributor
0 Kudos

Hi, Alejandro.

         Maybe try this.

if(!this.AccountID.IsInitial() && !this.YourCodeList.IsInitial()){

               this.Ext_Indicato=true;

}

Hope this helps.

Fred

Kinsbrunner
Active Contributor
0 Kudos

Fred, where would you put this piece of code?

Regards.

Alejandro.

former_member200567
Active Contributor
0 Kudos

Hi Alejandro.

      In the BeforeSave event of Customer xbo.

Best Regards

Fred